------+-----------------------+ | 'a' REGEXP 'A' | 'a' REGEXP BINARY 'A' | +----------------+-----------------------+ | 1 | 0 | +----------------+-----------------------+ SELECT 'a' REGEXP '^[a-d]'; +---------------------+ | 'a' REGEXP '^[a-d]' | +---------------------+ | 1 | +---------------------+ default_regex_flags examples ---------------------------- MariaDB 10.0.11 introduced the default_regex_flags variable to address the remaining compatibilities between PCRE and the old regex library. The default behaviour (multiline match is off) SELECT 'a\nb\nc' RLIKE '^b$'; +---------------------------+ | '(?m)a\nb\nc' RLIKE '^b$' | +---------------------------+ | 0 | +---------------------------+ Enabling the multiline option using the PCRE option syntax: SELECT 'a\nb\nc' RLIKE '(?m)^b$'; +---------------------------+ | 'a\nb\nc' RLIKE '(?m)^b$' | +---------------------------+ | 1 | +---------------------------+ Enabling the multiline option using default_regex_flags SET default_regex_flags='MULTILINE'; SELECT 'a\nb\nc' RLIKE '^b$'; +-----------------------+ | 'a\nb\nc' RLIKE '^b$' | +-----------------------+ | 1 | +-----------------------+ URL: https://mariadb.com/kb/en/regexp/https://mariadb.com/kb/en/regexp/