Search for matches using a regular expression.

Good for text cleanup during data import, and probably countless other cases.

Note: we may want to change the match result from a single value to a list of strings.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mitchell’s picture

Status: Active » Needs review
FileSize
690 bytes
2.24 KB
1.96 KB

Attached are two versions of the same patch. The first is by mlncn, and the second has a few changes to labels and help text by me. I include an interdiff for easy comparison.

Status: Needs review » Needs work

The last submitted patch, action-regex-1b.patch, failed testing.

geek-merlin’s picture

Status: Needs work » Needs review
FileSize
4.62 KB

Hey let's finally get this in.

Took patch 1b and
* fixed syntax error
* result is now a list of strings
* if a subpattern is named "result", this is taken, otherwise the whole match
* regexp input now includes delimiters and possibly modifiers (hardcoding delimiters is a PITA for some regexps and modifiers are useful)
* enriched descriptions and links
* added tests

patch flying in, food for testbot!

Status: Needs review » Needs work

The last submitted patch, 0001-Issue-1658092-Added-Action-Regular-Expression.patch, failed testing.

geek-merlin’s picture

Status: Needs work » Needs review
FileSize
4.65 KB

apply patch, apply!

geek-merlin’s picture

What about multibyte? We need to force the "u" modifier.
Added that.

geek-merlin’s picture

minor fix to result form label.

geek-merlin’s picture

Status: Needs review » Needs work

ups, this needs work on the result paradigm.

geek-merlin’s picture

Status: Needs work » Needs review
FileSize
9.62 KB

This looks better to me.

The last submitted patch, 0001-Issue-1658092-Added-Action-Regular-Expression.patch, failed testing.

geek-merlin’s picture

Issue summary: View changes
Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.