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 PCR
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.