Reputation: 1633
I want to filter out those with field not like '%_[0-9]+' ,
field not like '%_[0-9]+'
but it turns out that MySQL doesn't take it as regex,
is that possible in MySQL?
Upvotes: 17
Views: 8159
Reputation: 255115
That happens because of LIKE is not supposed to accept regular expression as a parameter. There is REGEXP for such things
WHERE field NOT REGEXP '%_[0-9]+'
Upvotes: 19