|Backslashes multiply weirdly:
SELECT 'a\b' RLIKE 'a\b';returns 1, as does...
SELECT 'a\\b' RLIKE 'a\\\\b';because in a pair of backslashes, the second is not escaped by the first, so to compare two literals you double each backslash in the
SELECT desc FROM xxx WHERE desc RLIKE 'aa\\\\\\\\bb';That's eight backslashes to match two!
Last updated 22 May 2009