开发者

mysql regex inverse (only for use by REGEXP)

开发者 https://www.devze.com 2023-03-25 01:56 出处:网络
I have a regex in mysql and wanna to inverse it. but don\'t wanna use NOT REGEXP. Negative lookbehind (开发者_运维技巧?![something]) is not working in mysql.

I have a regex in mysql and wanna to inverse it. but don't wanna use NOT REGEXP. Negative lookbehind (开发者_运维技巧?![something]) is not working in mysql. Exactly I wanna find rows that not -1 only with REGEXP. thanks


exactly regex for me is ^([^-][^1]|-[^1]|[^-]1|.?|.{3,})$


If you want to match values which are not -1, without using NOT REGEXP, you could use:

^([^-][^1]|.?|.{3,})$
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号