Syntax:
expr REGEXP pat, expr RLIKE pat

Returns 1 if the string expr matches the regular expression specified
by the pattern pat, 0 otherwise. If either expr or pat is NULL, the
return value is NULL.

RLIKE is a synonym for REGEXP.

The pattern can be an extended regular expression, the syntax for which
is discussed in
https://dev.mysql.com/doc/refman/5.7/en/regexp.html#regexp-syntax. The
pattern need not be a literal string. For example, it can be specified
as a string expression or table column.

*Note*:

Because MySQL uses the C escape syntax in strings (for example, \n to
represent the newline character), you must double any \ that you use in
your REGEXP arguments.

Regular expression operations use the character set and collation of
the string expression and pattern arguments when deciding the type of a
character and performing the comparison. If the arguments have
different character sets or collations, coercibility rules apply as
described in
https://dev.mysql.com/doc/refman/5.7/en/charset-collation-coercibility.
html. If either argument is a binary string, the arguments are handled
in case-sensitive fashion as binary strings.

URL: https://dev.mysql.com/doc/refman/5.7/en/regexp.html

