Tables regex filter

aix's profile image aix posted 5 months ago in General Permalink

Hey

Does anyone know if this filter should accept negative filters. And if it does then how should i define filter that would remove all tables from list that ends with specific suffix. Example i do not want to see tables in list that ends with "_aud"

Usually would expect something like:

.*(?<!_aud)$

But this not valid.

ansgar's profile image ansgar posted 5 months ago Permalink

The regular expression object used by HeidiSQL is documented here: https://regex.sorokin.engineer/en/latest/regular_expressions.html

That "negative lookahead assertion" is listed under the assertions:

Negative lookahead assertion: foo(?!bar) matches “foo” only if it’s not followed by “bar”.

But the example does not work in HeidiSQL here. Could be the library needs an update.

aix's profile image aix posted 5 months ago Permalink

Probably as i looked same manual and it works partially like foo(?!bar) <- this works but if you try to replace foowith dynamic part then it fails.

ansgar's profile image ansgar posted 5 months ago Permalink

I just updated the regular expression library for the next nightly build. But I'm afraid that did not add support for variable parts before a negative lookahead.

You could file a feature request on https://github.com/andgineer/TRegExpr/issues

Please login to leave a reply, or register at first.