View Single Post
Old 12-09-2007, 04:42 PM   #13 (permalink)
Geert
The Contributor
RegEx Guru 
 
Join Date: Dec 2007
Location: Belgium
Posts: 60
Thanks: 6
Geert is on a distinguished road
Default

Quote:
Originally Posted by Wildhoney View Post
5: REGEXP

Last but not least, REGEXP can be used in MySQL in place of the more primitive LIKE. It uses the standard PCRE syntax.
Quote from http://dev.mysql.com/doc/refman/5.0/en/regexp.html:
Quote:
MySQL uses Henry Spencer's implementation of regular expressions, which is aimed at conformance with POSIX 1003.2.
Just for the record, that's another regex flavor than PCRE. I believe it's the same as the PHP ereg functions.

Word boundary metacharacters, for example, are not \b but [[:<:]] and [[:>:]].

Also I believe POSIX keeps on searching for the longest match, whereas PCRE returns the first found match. Sounds a bit vague probably, anyway, my point is that MySQL's REGEXP and PCRE are not the same.
__________________
Kohana - PHP5 framework
Geert is offline  
Reply With Quote