MySQL NOT RLIKE Operator
In MySQL, The NOT RLIKE
operator returns whether a string mismatches a regular expression.
NOT RLIKE
is the negation of RLIKE
and it is the same as NOT REGEXP
..
NOT RLIKE
Syntax
Here is the syntax of the MySQL NOT RLIKE
operator:
str NOT RLIKE regexp
It is equivalent to NOT (str RLIKE regexp)
.
Parameters
str
- Required. The string to be tested.
regexp
- Required. The regular expression to which the string
str
is to be matched.
Return value
NOT RLIKE
returns 1
if the string str
mismatches the gaven regular expression regexp
, otherwise it returns 0
.
If any parameter is NULL
, NOT RLIKE
returns NULL
.
NOT RLIKE
performs a Case-insensitive matching.
NOT RLIKE
Examples
Here are some examples of MySQL CHAR()
function.
SELECT
'hello' NOT RLIKE '^[a-z]+$',
'hello' NOT RLIKE '^[A-Z]+$',
'12345' NOT RLIKE '[0-9]+$',
'12345' NOT RLIKE '^\\d+$',
'123ab' NOT RLIKE '^\\d*$',
'123ab' NOT RLIKE '^.*$'\G
'hello' NOT RLIKE '^[a-z]+$': 0
'hello' NOT RLIKE '^[A-Z]+$': 0
'12345' NOT RLIKE '[0-9]+$': 0
'12345' NOT RLIKE '^\\d+$': 0
'123ab' NOT RLIKE '^\\d*$': 1
'123ab' NOT RLIKE '^.*$': 0