Reputation: 195
When i try to use the following regexp in sql i am getting the error.
[0-9]{10,}|(?:[\+\(]|1\-)\s*[0-9]+([ \.\(\)\-/x]+[0-9]{2,})+[0-9]
Please let me know the mistake i have done on this.
Error i am getting is,
1139 Got error 'repetition-operator operand invalid' from regexp
Upvotes: 5
Views: 3618
Reputation: 333
See bug http://bugs.mysql.com/bug.php?id=399
\+ is getting seen as repetition-operator So this fails too:
mysql> select 'fred' regexp('?[\+]');
ERROR 1139 (42000): Got error 'repetition-operator operand invalid' from regexp
Upvotes: 3