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!

Community
  • 1
  • 1
Gal
  • 23,122
  • 32
  • 97
  • 118
  • FYI: It looks like you have 2 `WHERE` clauses in your query. This is probably not what you meant to type. – Asaph Nov 29 '09 at 16:00

0 Answers0