This occured with jakarta-regexp-1.3 (final) on WinXP using j2sdk 1.4.2. Trying to compile regular expressions using the negated character classes \W, \S\ or \D causes, on execution: org.apache.regexp.RESyntaxException: Syntax error: Bad character class Even the simplest possible example fails: RE re = new RE("[^\\W]"); It works though with \w, \s or \d.
Implemented support for [\W] and [^\W] etc.