List:General Discussion« Previous MessageNext Message »
From:Andy Eastham Date:November 4 2002 11:20am
Subject:RE: select using regexp
View as plain text  
Mark,

It looks like you should be using full-text indexes and the match and
against functions to me.

Check out section 6.8 in the manual.

Andy
mysql query

> -----Original Message-----
> From: Mark Goodge [mailto:mark@stripped]
> Sent: 04 November 2002 11:21
> To: mysql@stripped
> Subject: select using regexp
>
>
> Hi,
>
> I've got a problem that I'm hoping someone can help with. I need to do
> a query against a text column in order to extract entries that will
> match whole words only - for example, a search for "cat" should match
> any of:
>
>   The cat sat on the mat
>   It was a large cat.
>   Cat food is interesting.
>   Dog. Cat. Fish.
>
> but not match
>
>   in a catatonic state
>   it was a catastrophe
>  scattergun approach
>
> It looks as if the MySQL REGEXP function is what I need here, but I
> can't work out from the documentation how to get what I want.
>
> Any suggestions?
>
> Mark
>
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
> To request this thread, e-mail <mysql-thread123916@stripped>
> To unsubscribe, e-mail
> <mysql-unsubscribe-andy=barllama.demon.co.uk@stripped>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>


Thread
select using regexpMark Goodge4 Nov
  • RE: select using regexpAndy Eastham4 Nov
  • RE: select using regexpPeter Lovatt4 Nov
    • Re: select using regexpgerald_clark4 Nov
    • Re: select using regexpJoseph Bueno4 Nov