mysql> mysql> mysql> mysql> mysql> SELECT 'A\nB' REGEXP '^A$'; +---------------------+ | 'A\nB' REGEXP '^A$' | +---------------------+ | 0 | +---------------------+ 1 row in set (0.00 sec) mysql> mysql> SELECT 'AA' REGEXP '^A'; +------------------+ | 'AA' REGEXP '^A' | +------------------+ | 1 | +------------------+ 1 row in set (0.00 sec) mysql>