mysql regex inverse (only for use by REGEXP)
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,})$
精彩评论