Using non-capture groups in MySQL REGEXP

For some reason, I cannot use groups without capture in MySQL. Is there any way to use them in MySQL REGEXP?

For non-capturing groups in a PHP PCRE implementation, I use this syntax:

(?:[PATTERN])
+5
source share
1 answer

Groups in MySQL regexes don't capture groups, since capturing groups in SQL doesn't make much sense ... well, not without adding syntax to support the use of captured substrings. Therefore, it does not support the syntax (?: ), since this syntax does not make sense in MySQL - the groups are no longer fixed.

So, ([PATTERN])is an unattractive group.

+10

All Articles