Operator | Description | Example |
---|---|---|
~ | Matches regular expression, case sensitive | ‘thomas‘ ~ ‘.*thomas.*‘ |
~* | Matches regular expression, case insensitive | ‘thomas‘ ~* ‘.*Thomas.*‘ |
!~ | Does not match regular expression, case sensitive | ‘thomas‘ !~ ‘.*Thomas.*‘ |
!~* | Does not match regular expression, case insensitive | ‘thomas‘ !~* ‘.*vadim.*‘ |
注意:~相当于like
Some examples:
‘abc‘ ~ ‘abc‘ true ‘abc‘ ~ ‘^a‘ true ‘abc‘ ~ ‘(b|d)‘ true ‘abc‘ ~ ‘^(b|c)‘ false
原文:http://www.cnblogs.com/kevinge/p/3825794.html