what about changing the way the detection of the regex is done, to allow using regex modifiers as well (in case you want it to be case insensitive for instance) ? Would it make sense ?