in reply to Re^2: Regex problemin thread Regex problem
In single-quoted literals, escaping \ is optional if it's not followed by \ or the string delimiter.
$x = 'a\b'; print("$x\n"); $x = 'a\\b'; print("$x\n"); [download]
a\b a\b [download]