Got an "invalid repeat count" error from regexp

The following error appeared in mysql:

Got error 'invalid repetition count(s)' from regexp

My request:

SELECT * FROM table WHERE some_text_field REGEXP"[A-Za-z0-9]{256}"

But when I replace REGEXP"[A-Za-z0-9]{256}"with REGEXP"[A-Za-z0-9]{255}", and below there is no error.

Is there a character limit in REGEXP? Why doesn't it work when I use 256 or higher, but it works when I replace it with 255 or lower?

I examined this, the Mysql exception exception for Regex , but it is not very informative why the error occurs.

+5
source share
1 answer

As described in Regular Expressions :

, a{n} n a. a{n,} n a. a{m,n} m n a .

m n 0 RE_DUP_MAX ( 255) . m n, m n.

+6

All Articles