RE: select using regexp

2002-11-04 Thread Andy Eastham
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;good-stuff.co.uk] Sent: 04 November 2002 11:21 To: [EMAIL PROTECTED]

RE: select using regexp

2002-11-04 Thread Peter Lovatt
Hi You could use either normal or fulltext searches. Regexp may well be a good answer (not used it myself). The following should also work SELECT * FROM table WHERE field LIKE % cat % OR field LIKE % cat. % OR field LIKE % cat, % (note the spaces to make sure you get only complete words) or if

Re: select using regexp

2002-11-04 Thread gerald_clark
There are too many exceptions for this to be usefull. What about lines ending in cat. or cat, Your example won't match them. Perhaps % cat.% and % cat,% patterns might be more helpfull, but what about lines that begin with cat? Peter Lovatt wrote: Hi You could use either normal or fulltext

Re: select using regexp

2002-11-04 Thread Joseph Bueno
Hi, REGEXP is much more powerful than LIKE; you can match full words with this syntax: SELECT * FROM TABLE WHERE field REGEXP [[::]]cat[[::]]; (Easy, isn't it ? ;) ) You can find more examples in the manual: http://www.mysql.com/doc/en/Regexp.html Regards, Joseph Bueno NetClub gerald_clark