not regexp

description

syntax

BOOLEAN not regexp(VARCHAR str, VARCHAR pattern)

Perform regular matching on the string str, return false if it matches, and return true if it doesn’t match. pattern is a regular expression.

example

  1. // Find all data in the k1 field that does not start with 'billie'
  2. mysql> select k1 from test where k1 not regexp '^billie';
  3. +--------------------+
  4. | k1 |
  5. +--------------------+
  6. | Emmy eillish |
  7. +--------------------+
  8. // Find all the data in the k1 field that does not end with 'ok':
  9. mysql> select k1 from test where k1 not regexp 'ok$';
  10. +------------+
  11. | k1 |
  12. +------------+
  13. | It's true |
  14. +------------+

keyword

REGEXP, NOT, NOT REGEXP