16 messages in com.mysql.lists.mysqlRe: word boundaries
FromSent OnAttachments
jm...@charm10 Dec 2000 03:40 
Jeremy D. Zawodny10 Dec 2000 10:11 
Seung-woo Nam10 Dec 2000 12:21 
jm...@charm10 Dec 2000 16:45 
Seung-woo Nam10 Dec 2000 20:42 
Trey Connell11 Dec 2000 00:46 
jmj11 Dec 2000 03:48 
Seung-woo Nam11 Dec 2000 12:46 
Trey Connell11 Dec 2000 13:24 
Stephen Woodbridge11 Dec 2000 13:26 
Steve Ruby11 Dec 2000 13:45 
Trey Connell11 Dec 2000 14:14 
Steve Ruby11 Dec 2000 14:56 
jodie11 Dec 2000 15:00 
Jim Carey15 Dec 2000 20:33 
Jim Carey15 Dec 2000 20:34 
Subject:Re: word boundaries
From:Stephen Woodbridge (wood@mediaone.net)
Date:12/11/2000 01:26:53 PM
List:com.mysql.lists.mysql

select article_id from articles where article_body rlike "\bGE\b";

Using rlike also put is in case sensitive mode, so you might want to say rlike "\b[gG][eE]\b"

-Steve

Trey Connell wrote:

Hi all, I have the latest version of MySQL running on a FreeBSD box. I need to perform a search on a table in my database that takes word boundaries into account. The specific column I am searching holds the body of articles that are uploaded. Right now I do this:

select article_id from articles where article_body like "%GE%";

This, of course, returns everything with GE somewhere in it - huGE, GEneral, GEnius - you get the idea. How can I write the query so that I only get back results where GE is found as a word by itself? The solution also needs to take into account punctuation before and after the word GE.

Thanks!

Trey

--

--------------------------------------------------------------------- Please check "http://www.mysql.com/documentation/manual.php" before posting. To request this thread, e-mail mysq@lists.mysql.com

To unsubscribe, send a message to: <mysql-unsubscribe-woodbri=medi@lists.mysql.com>

If you have a broken mail client that cannot send a message to the above address (Microsoft Outlook), you can use: http://lists.mysql.com/php/unsubscribe.php