Reputation: 499
I am using the following RegEx (check on different RegEx checkers online, on which it works):
^((?!pro).)*$
However, GA gives me an error: Invalid regular expression Your data request includes an invalid regular expression.
The line I am trying to exclude is: xx-pro-xxx-xxx
I have read through the documentation Google provides, but cannot seem to find why it is not working.
Does anybody know what the problem is and how to solve it?
Upvotes: 1
Views: 57
Reputation: 23327
GA doesn't seem to support lookeheads ((?!...)
), so you can't use that regex. Maybe there is a way to use .{2}-pro-.{3}-.{2}
in a negative condition, i.e. "don't use strings that match this pattern"?
General advice - every regex engine is different and supports different set of operators. It's not enough to check regex on other engines
Upvotes: 1