Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
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.
Comments
Comment #1
mitchell CreditAttribution: mitchell commentedAttached 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.
Comment #3
geek-merlinHey 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!
Comment #5
geek-merlinapply patch, apply!
Comment #6
geek-merlinWhat about multibyte? We need to force the "u" modifier.
Added that.
Comment #7
geek-merlinminor fix to result form label.
Comment #8
geek-merlinups, this needs work on the result paradigm.
Comment #9
geek-merlinThis looks better to me.
Comment #11
geek-merlinhttps://www.drupal.org/project/rules_regex
;-)