Using Non-Capturing Groups in MySQL REGEXP

前端 未结 1 1258
轻奢々
轻奢々 2021-01-12 03:00

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

相关标签:
1条回答
  • 2021-01-12 03:41

    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.

    0 讨论(0)
提交回复
热议问题