curly braces group abc as a whole, and square brackets allow any of a, or b, or c to match, allowing a whole range of other possibilities
mysql>
mysql> SELECT 'abcbbcccc' REGEXP '[abc]{3}';
+-------------------------------+
| 'abcbbcccc' REGEXP '[abc]{3}' |
+-------------------------------+
| 1 |
+-------------------------------+
1 row in set (0.00 sec)
mysql>
mysql> SELECT 'abcbbcccc' REGEXP '(a|b|c){3}';
+---------------------------------+
| 'abcbbcccc' REGEXP '(a|b|c){3}' |
+---------------------------------+
| 1 |
+---------------------------------+
1 row in set (0.00 sec)
mysql>
Related examples in the same category