How to use regex in MySQL?

后端 未结 1 1510
别跟我提以往
别跟我提以往 2021-01-08 01:00

I want to filter out those with field not like \'%_[0-9]+\' ,

but it turns out that MySQL doesn\'t take it as regex,

is that possible in MySQL?<

相关标签:
1条回答
  • 2021-01-08 01:16

    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]+'
    
    0 讨论(0)
提交回复
热议问题