NOT RLIKE
This page is part of MariaDB's Documentation.
The parent of this page is: SQL Operators for MariaDB Xpand
Topics on this page:
Overview
See NOT REGEXP.
USAGE
check NOT RLIKE match
Value Name | Description |
---|---|
| A string expression to check |
| A regular expression match string |
EXAMPLES
SELECT 'Hello there' NOT RLIKE 'the';
+-------------------------------+
| 'Hello there' NOT RLIKE 'the' |
+-------------------------------+
| 0 |
+-------------------------------+
SELECT 'Hello there' NOT RLIKE '^x';
+------------------------------+
| 'Hello there' NOT RLIKE '^x' |
+------------------------------+
| 1 |
+------------------------------+
CREATE TABLE not_rlike_example (
description VARCHAR(20),
example INT
);
INSERT INTO not_rlike_example VALUES
('Everything', 42),
('Dalmations', 101),
('Agent', 99),
('B. Doz.', 13),
('CPU', 64);
SELECT *
FROM not_rlike_example
WHERE description NOT RLIKE 'ing$|^....t';
+-------------+---------+
| description | example |
+-------------+---------+
| Dalmations | 101 |
| B. Doz. | 13 |
| CPU | 64 |
+-------------+---------+
-- Note that a backslash needs to be doubled due to string escaping
SELECT *
FROM not_rlike_example
WHERE description NOT RLIKE '\\.';
+-------------+---------+
| description | example |
+-------------+---------+
| Everything | 42 |
| Dalmations | 101 |
| Agent | 99 |
| CPU | 64 |
+-------------+---------+