当我尝试在sql中使用以下regexp时,我收到错误。
[0-9]{10,}|(?:[\+\(]|1\-)\s*[0-9]+([ \.\(\)\-/x]+[0-9]{2,})+[0-9]
请让我知道我在这方面所犯的错误。
我得到的错误是,
1139从regexp
获得错误'重复 - 运算符操作数无效'
答案 0 :(得分:3)
请参阅错误http://bugs.mysql.com/bug.php?id=399
\ +被视为重复运算符 所以这也失败了:
mysql> select 'fred' regexp('?[\+]');
ERROR 1139 (42000): Got error 'repetition-operator operand invalid' from regexp