Changes

Jump to: navigation, search

MySQL Regular Expression Searches

6 bytes added, 19:02, 19 October 2007
Matching by Text Position
As we can see from the above example, because the word 'Phone' contains the word 'one' we have retrieved more rows than we anticipated. Using the beginning and and end of word metacharacters we can isolate the instances of 'one' which are a standalone word:
<pre>
mysql> SELECT prod_name FROM product WHERE prod_name REGEXP '[[:<:]]One[[:>:]]';
+----------------------+

Navigation menu