'-' is not allowed in a character class
Brought to you by:
samokhodkin
jregex the following exception when it encounters a string like "[-0-
9A-z]" in a pattern:
jregex.PatternSyntaxException: [-...] is
illegal
How can I then specify a character class which includes
a '-' (minus) sign? I have been so far using a library which allowed the
first character in a class to be '-'.
Thanks,
Alexander
Maryanovsky.
Logged In: YES
user_id=367459
> How can I then specify a character class which includes
> a '-' (minus) sign?
The current syntax requires the '-' to be escaped to have a
literal meaning within a char class , like [\-0-9a-z] (the
corresponding java literal is "[\\-0-9a-z]").
Consider submitting a feature request.
Logged In: YES
user_id=503759
Actually, what I did in the meanwhile was commenting line 397 and
uncommenting line 396. This seems to work perfectly... Are there any
problems with that modification I should be aware of?
Alexander
Maryanovsky.