fixing regex escaping sequences