Bug 30126 - Error on negating certain predefined character classes (\W\S\D)
Summary: Error on negating certain predefined character classes (\W\S\D)
Alias: None
Product: Regexp
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---
Assignee: Jakarta Notifications Mailing List
Depends on:
Reported: 2004-07-15 15:42 UTC by Klaus Lechner
Modified: 2005-08-12 14:46 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Klaus Lechner 2004-07-15 15:42:08 UTC
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.
Comment 1 Vadim Gritsenko 2005-08-12 22:46:05 UTC
Implemented support for [\W] and [^\W] etc.