2

Possible Duplicate:
How to do a regular expression replace in MySQL?

When I search the db for a certain value, say a singular noun like "party", I want to be able to get the value "party" from the db, even though it's actually "parties". For that I thought about replacing the -ies suffix for -y, which didn't have any conspicuous exceptions (maybe "lies").

Is there a MySQL equivalent to the PHP Preg_Replace using regex? Can I handle it otherwise without a mysql function?

so:

SELECT * FROM table WHERE preg_replace('/(.)*ies/','y',column) WHERE column="party";' 

Thanks!

1
  • FYI: It looks like you have 2 WHERE clauses in your query. This is probably not what you meant to type. Commented Nov 29, 2009 at 16:00

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.