REGEX in filters not working


#1

I have a variable where I want to have customer Regex text so that I don’t have to hard code all the examples.

Regex code where I have to put an escape characters ‘//’ work when I have to hard code them but DO NOT work when entered into a filter

For example I want to filter out (add-ons, etc). Which work when I do this with hardcoded SQL \(add-ons\, etc\.\)

But if I put that same thing in the filter box. It does not work. What is going on? Is there a workaround?


#2

I wouldn’t currently expect that you can use a Regex in filter Metabase - it will probably just take the Regex text you enter and filter on that verbatim (and then probably won’t match anything).

As you mention yourself - the workaround is to drop to hardcoded SQL, where the Regex syntax may even vary among different database engines.