I used java regexp today and found that you are not allowed to use the following regex sequence
String pattern = "[a-zA-Z\\s\\.-\\)\\(]*";
if I use it, it will fail and tell me that \ (is not a valid character.
But if I changed regexp to
String pattern = "[[a-zA-Z\\s\\.-]|[\\(\\)]]*";
Then it will work. Is this a bug in the regxp engine, or I donβt understand how to work with the engine?
EDIT: I had an error in my line: there should not be 2 starts [[, this should be only one. This is now fixed.
source share