Reputation: 131
i have rows of text like this in database:
row1 -> text text!? sometext..!
row2 -> text!! sometext !whatever
row3 -> sometext !
row4 -> !this is sometext sometext
just like preg_match, what is query to call rows that contains !(word) and !!
the result i want is like:
text!! sometext !whatever
!this is sometext sometext
anyone can help?
thank you very much!
Upvotes: 3
Views: 6879
Reputation: 360702
SELECT yourfield
FROM yourtable
WHERE yourfield REGEXP '(!!|!sometext)'
relevant docs here: http://dev.mysql.com/doc/refman/5.1/en/regexp.html
Upvotes: 7