Return to Snippet

Revision: 24205
at February 23, 2010 14:06 by davidrinnan

Initial Code
SELECT * FROM 'table' WHERE `name` REGEXP '\r'

UPDATE 'table' SET 'field' = replace(field,"findvalue", "reaplcevalue") WHERE REGEXP 'regexp search expression'

Initial URL

Initial Description
After a problem with row break in a text field I found this way of searching within a where clause in an SQL query. Can be used for selection or update / replace purposes of course.

Initial Title
Search and replace within a field with regex in MySQL

Initial Tags
regex, search

Initial Language