Outdated Version

You are viewing an older version of this section. View current production version.

RLIKE

Performs a partial-string search, with regular expression matching.

Syntax

str RLIKE regexp
str REGEXP regexp

Arguments

  • str: any string or binary object
  • regexp: regular expression. The supported syntax is identical to MySQL.

Return Type

Boolean

Info

Regular expressions in MemSQL are not Unicode-aware, and so may fail to match characters that would otherwise be considered equivalent.

Examples

memsql> select 'ohai' rlike 'o';
+------------------+
| 'ohai' rlike 'o' |
+------------------+
|                1 |
+------------------+

memsql> select 'ohai' rlike 'o.+';
+--------------------+
| 'ohai' rlike 'o.+' |
+--------------------+
|                  1 |
+--------------------+

memsql> select 'olé' regexp 'É';
+--------------------+
| 'olé' regexp 'É'   |
+--------------------+
|                  0 |
+--------------------+