For some reason I can't seem to use non-capturing groups in MySQL. Is there a way to use them in a MySQL REGEXP
?
For non-capturing groups in PHP's PCRE implementation, I use this syntax:
(?:[PATTERN])
Groups in MySQL regular expressions are not capturing groups, since capturing groups in SQL wouldn't make much sense... well, not without the addition of syntax to support using the captured substrings. So it doesn't support the (?: )
syntax, since this syntax is pointless within MySQL -- the groups already don't capture.
So, ([PATTERN])
IS a non-capturing group.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With