Hi there!
Just started playing with the flexifilter module. Despite of no docs, I like it. Wanted to do some preg_replacements.
Didn't work, source told me why: you actively add the delimiter around the regex without telling anybody.
This is for many reasons not a good idea (at least I think so):
- preg regular expressions are nicely documented, now you cannot use/refer-to that documentation without explanation
- you don't tell anybody, so who knows php must run against the wall: no match for two nested delimiters!
- Killer: modifiers do not work anymore, so e.g. no multiline, no case-switches, nothing! (think of: /^bla$/m)
My recommendation: do not do it! At all, just pass on the regex as is. So you can refer to the php man pages for regular expressions and all will work!
Alternatively: allow to select the behaviour, but tell the people in the form-hints!
Personally I'll now patch the thing to not at all delimit the regex actively, so I can use multiline regex.
I know that I mess with the code but I need the multiline, unless you have a better idea on how to implement DokuWiki style lists.
May the source be with you
Adrian
(the_prefect)
Comments
Comment #1
andyg5000I know this ticket is old, but I agree! It couldn't figure out why my regex's weren't working until I found this issue. Ouch!
Comment #2
jojomojo commentedSame here.
Do you know where the limitation in the module is? Cant seem to find it.
Other than that, I love the module.