in reply to pattern matching question

The \ character is probably being eaten by the regex engine. See quotemeta.