Got the error "operand repeat operator is invalid" from regexp - mysql

When I try to use the following regexp in sql, I get an error.

 [0-9]{10,}|(?:[\+\(]|1\-)\s*[0-9]+([ \.\(\)\-/x]+[0-9]{2,})+[0-9]

Please let me know the mistake I made about this.

The error I get is

1139 Invalid "operand repeat operator" error from regexp

+5
source share
1 answer

See the error http://bugs.mysql.com/bug.php?id=399

\ + is perceived as a repetition operator. So this also fails:

mysql> select 'fred' regexp('?[\+]'); 
ERROR 1139 (42000): Got error 'repetition-operator operand invalid' from regexp
+3
source

All Articles