Match zero or more instances of the sequence abc : Sequence : Regular Expressions MySQL TUTORIALS


MySQL TUTORIALS » Regular Expressions » Sequence »

 

Match zero or more instances of the sequence abc


mysql>
mysql> SELECT 'ABC' REGEXP '^(ABC)*$';
+-------------------------+
'ABC' REGEXP '^(ABC)*$' |
+-------------------------+
|                       |
+-------------------------+
row in set (0.00 sec)

mysql>
mysql> SELECT 'ABC' REGEXP '^(AB)*$';
+------------------------+
'ABC' REGEXP '^(AB)*$' |
+------------------------+
|                      |
+------------------------+
row in set (0.00 sec)

mysql>
mysql> SELECT 'ABCABC' REGEXP '^(AB)*$';
+---------------------------+
'ABCABC' REGEXP '^(AB)*$' |
+---------------------------+
|                         |
+---------------------------+
row in set (0.00 sec)

mysql>



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

MySQL TUTORIALS

 Navioo Regular Expressions
» Sequence