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*:

MySQL uses C escape syntax in strings (for example, \n to represent the
newline character). If you want your expr or pat argument to contain a
literal \, you must double it. (Unless the NO_BACKSLASH_ESCAPES SQL
mode is enabled, in which case no escape character is used.)

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

