Re: REGEXP problems
Emily Frazier wrote:
> I'm searching through a table called "Subjects" for the string "Social Sciences". However, I also
> hav ea subject in this table called "Science". So when I do the regexp it does both...but I want it
> to strictly only accept exact matches.
From the example "Social SciencesHistoryArt" in your original post I suppose you cannot use the word boundary markers [[:<:]], [[:>:]] (see
http://dev.mysql.com/doc/mysql/en/regexp.html).
So I would suggest you add another column 'seen' to your table and set it when you encounter a match, so you can ignore the record with the next regex. Then start matching from long to short (i.e. first Social Sciences, then Science).
--
felix
Please use
BBCode to format your messages in this forum.
Subject
Written By
Posted
Re: REGEXP problems
May 19, 2005 02:54PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.