宣言
str RLIKE pat
説明
文字列が正規表現とマッチするかどうかを返します。文字列 str が指定された正規表現と一致する場合は 1 を返し、そうでない場合は 0 を返します。文字列 str または pat のいずれか一方が NULL の場合、戻り値は NULL になります。
この関数は REGEXP() のシノニムです。
例
obclient> SELECT 'hello world!' RLIKE '^hello','hello world!' RLIKE '^hello$';
+-------------------------------+--------------------------------+
| 'hello world!' RLIKE '^hello' | 'hello world!' RLIKE '^hello$' |
+-------------------------------+--------------------------------+
| 1 | 0 |
+-------------------------------+--------------------------------+
1 row in set