Mega Code Archive

 
Categories / MySQL / Regular Expression
 

Parentheses indicate an entire character string, and curly braces indicate how many times the character string

must appear in succession: mysql> mysql> SELECT 'xabcabcz' REGEXP '(abc){2}', 'xabcyabcz' REGEXP '(abc){2}'; +------------------------------+-------------------------------+ | 'xabcabcz' REGEXP '(abc){2}' | 'xabcyabcz' REGEXP '(abc){2}' | +------------------------------+-------------------------------+ |                            1 |                             0 | +------------------------------+-------------------------------+ 1 row in set (0.00 sec) mysql>