当我尝试在 sql 中使用以下正则表达式时出现错误。
[0-9]{10,}|(?:[\+\(]|1\-)\s*[0-9]+([ \.\(\)\-/x]+[0-9]{2,})+[0-9]
请让我知道我在这方面犯的错误。
我得到的错误是,
1139 Got error 'repetition-operator operand invalid' from regexp
最佳答案
查看错误 http://bugs.mysql.com/bug.php?id=399
\+ 被视为重复运算符 所以这也失败了:
mysql> select 'fred' regexp('?[\+]');
ERROR 1139 (42000): Got error 'repetition-operator operand invalid' from regexp
关于php - 从正则表达式中得到错误 'repetition-operator operand invalid' - mysql,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15353622/