regex match string that does not contain substr and case insensitive
I have a a string like maxreheattemp. I want my regex test to fail when the substring reheat is in it. I can do that with
^((?!reheat).)*$but I also want my test to be case insensitive. I usually use (?i) for that, but can't find a way to combine the two so that maxReHeattemp also fails.
How do I do that?
1 Answer
With PCRE engine, you can do:
^(?i)((?!reheat).)*$ 3