Assuming you want to match a character that is not a digit between 1 and 5 and not an alphabetic character try RE re = new RE("[^1-5a-zA-Z]"); I'm guessing the compiler is complaining because you are trying to nest the character class [:alpha:] inside the outer character class.
Sam -----Original Message----- From: Marc Guillemot [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 04, 2002 3:01 AM To: [EMAIL PROTECTED] Subject: POSIX Class in Class: [^1-5[:alpha:]] Hi, I want to do something like: RE re = new RE("[^1-5[:alpha:]]"); but I get: org.apache.regexp.RESyntaxException: Syntax error: Mismatched class at org.apache.regexp.RECompiler.syntaxError(RECompiler.java:253) at org.apache.regexp.RECompiler.terminal(RECompiler.java:875) at org.apache.regexp.RECompiler.closure(RECompiler.java:942) at org.apache.regexp.RECompiler.branch(RECompiler.java:1151) at org.apache.regexp.RECompiler.expr(RECompiler.java:1203) at org.apache.regexp.RECompiler.compile(RECompiler.java:1281) at org.apache.regexp.RE.<init>(RE.java:490) at org.apache.regexp.RE.<init>(RE.java:475) Any idea why this is wrong and how I can achieve this? Thanks. Marc. -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> ******************************************************************** The information contained in this communication is confidential, is intended only for the use of the recipient named above, and may be legally privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please re-send this communication to the sender and delete the original message or any copy of it from your computer system. Thank You. -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>