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