在我的数据库中,我有一些类似这样的键:
custom_field_languages(0)language
custom_field_languages(1)language
custom_field_languages(2)language
...
我需要它们全部。但这并不起作用:
REGEXP '^custom_field_languages([0-9])language'
这也不行。
REGEXP '^custom_field_languages\([0-9]\)language'
这个方法可以使用,但并不是百分之百准确。
REGEXP '^custom_field_languages.[0-9].language'
如何正确转义普通括号?
"\("
就是"("
,而"\\("
到达 MySQL 后实际上是\(
。 - tadman