At 19:14 -0400 6/27/04, Luke Majewski wrote:
Hi All,

I have fields like:

"Washable Velour Doll"

in my database and I want to do a boundary match so that when people enter a search field like "Velour" I return all instances where the whole word exists. In other words, 'lour' would not work. I know that reg expressions have boundary matching, so \bVelour\b should match all whole words "Velour."

Why do you think this? That's not what the regex chapter in the MySQL manual says. \b works in Perl, but MySQL isn't Perl.


So I've tried making this into a query many different ways, and since I am a regexp nub I can't seem to find the right query. The basic query looks something like:


select name from resource where name regexp '[\b](searchText)[\b];

Does anyone know whether this is supported? I've also tried writing my own boundary check with limited success.

The easiest way to find out the correct syntax is to look in the MySQL manual. :-)

http://dev.mysql.com/doc/mysql/en/Regexp.html

--
Paul DuBois, MySQL Documentation Team
Madison, Wisconsin, USA
MySQL AB, www.mysql.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to