RLIKE

USAGE

check RLIKE match

Value Name

Description

check

The string to search

match

The regular expression match string

DETAILS

See REGEXP.

SYNONYMS

SCHEMA

PARAMETERS

SKYSQL

PRIVILEGES

EXAMPLES

SELECT 'This is a test' RLIKE 't.sts?' AS result1,
       '3' RLIKE 3 AS result2;
+---------+---------+
| result1 | result2 |
+---------+---------+
|       1 |       1 |
+---------+---------+
SELECT 'Hello there' RLIKE '^e';
+--------------------------+
| 'Hello there' RLIKE '^e' |
+--------------------------+
|                        0 |
+--------------------------+
CREATE TABLE rlike_example (
  description VARCHAR(20),
  example INT
);
INSERT INTO rlike_example VALUES
  ('Everything', 42),
  ('Dalmations', 101),
  ('Agent', 99),
  ('B. Doz.', 13),
  ('CPU', 64);
SELECT *
FROM rlike_example
WHERE description RLIKE 'ing$|^....t';
+-------------+---------+
| description | example |
+-------------+---------+
| Everything  |      42 |
| Agent       |      99 |
+-------------+---------+
-- Note that a backslash needs to be doubled due to string escaping
SELECT *
FROM rlike_example
WHERE description REGEXP '\\.';
+-------------+---------+
| description | example |
+-------------+---------+
| B. Doz.     |      13 |
+-------------+---------+

ERROR HANDLING

FEATURE INTERACTION

RESPONSES

DIAGNOSIS

ISO 9075:2016

CHANGE HISTORY

Release Series

History

23.09

  • Present starting in MariaDB Xpand 23.09.1.

6.1

  • Present starting in MariaDB Xpand 6.1.0.

6.0

  • Present starting in MariaDB Xpand 6.0.3.

5.3

  • Present starting in MariaDB Xpand 5.3.13.

Release Series

History

6.0

  • Present starting in MariaDB Xpand 6.0.3.

5.3

  • Present starting in MariaDB Xpand 5.3.13.

Release Series

History

6.1

  • Present starting in MariaDB Xpand 6.1.0.

EXTERNAL REFERENCES