Match the beginning and end of words, respectively( [[:<:]], [[:>:]] ) : word « Regular Expressions « MySQL Tutorial






mysql>
mysql> SELECT 'a word a' REGEXP '[[:<:]]word[[:>:]]';
+----------------------------------------+
| 'a word a' REGEXP '[[:<:]]word[[:>:]]' |
+----------------------------------------+
|                                      1 |
+----------------------------------------+
1 row in set (0.00 sec)

mysql>
mysql> SELECT 'a xword a' REGEXP '[[:<:]]word[[:>:]]';
+-----------------------------------------+
| 'a xword a' REGEXP '[[:<:]]word[[:>:]]' |
+-----------------------------------------+
|                                       0 |
+-----------------------------------------+
1 row in set (0.00 sec)

mysql>
mysql>








24.12.word
24.12.1.Match the beginning and end of words, respectively( [[:<:]], [[:>:]] )