Escape backslashes in match string and pattern