I'm trying to select a sentence in mysql starting with the word 'by' and NOT followed by the word 'the', but it's not working somehow. What am I doing wrong?
WHERE response REGEXP '^by ?!the'
mysql regex doesn't support positive or negative lookeaheads. alternatively you could do something like
response REGEXP '^by ' and response not like 'by the%'