fix regex of character escaping