handle special characters in Pattern.Literal()