I'm having trouble using a regular expression to select some results from my MySQL table.
I'm using this query
SELECT text
FROM `articles`
WHERE content REGEXP '.*<img.*?src=\"http://www'
ORDER BY date DESC
And it says
#1139 - Got error 'repetition-operator operand invalid' from regexp
I tested the regex with Notepad++ and it works, why MySQL is giving me this error and how can i fix it?
LIKE '%<img src="http://www%'
... Simpler – Groove<img src="http://www
or<img style="..." src="http://www"
, that's why i'm using a regex, i have to check the image source even if the<img
tag contains other attributes before thesrc
one – Abohm