Skip to main content
Skip to main content

NOT REGEXP

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​

// Find all data in the k1 field that does not start with 'billie'
mysql> select k1 from test where k1 not regexp '^billie';
+--------------------+
| k1 |
+--------------------+
| Emmy eillish |
+--------------------+

// Find all the data in the k1 field that does not end with 'ok':
mysql> select k1 from test where k1 not regexp 'ok$';
+------------+
| k1 |
+------------+
| It's true |
+------------+

keywords​

REGEXP, NOT, NOT REGEXP