Match any sequence of zero or more a characters: a* : Zero or More « Regular Expressions « MySQL Tutorial






mysql>
mysql> SELECT 'Ban' REGEXP '^Ba*n';
+----------------------+
| 'Ban' REGEXP '^Ba*n' |
+----------------------+
|                    1 |
+----------------------+
1 row in set (0.00 sec)

mysql>
mysql> SELECT 'Baaan' REGEXP '^Ba*n';
+------------------------+
| 'Baaan' REGEXP '^Ba*n' |
+------------------------+
|                      1 |
+------------------------+
1 row in set (0.00 sec)

mysql>
mysql> SELECT 'Bn' REGEXP '^Ba*n';
+---------------------+
| 'Bn' REGEXP '^Ba*n' |
+---------------------+
|                   1 |
+---------------------+
1 row in set (0.00 sec)








24.13.Zero or More
24.13.1.Match any sequence of zero or more a characters: a*
24.13.2.Get first name with zero or more J characters: J*