You are viewing a plain text version of this content. The canonical link for it is here.
Posted to regexp-user@jakarta.apache.org by Millington Roger <ro...@barclaycard.co.uk> on 2001/06/20 15:55:14 UTC

Is [:] a valid character set?

Hi All,

Using jakarta-regexp-1.2  I get the exception -

org.apache.regexp.RESyntaxException: Syntax error: Invalid POSIX character
class syntax

when using the regular expression "( *[:] *)|( *, *)".

The error message seems to indicate that the parser assumes that ':' is the
start of a POSIX character set i.e. something along the lines of [:xxxxx:].

If I change the RE to  "( *[\\:] *)|( *, *)" it compiles OK.

Jakarta-ORO, IBM Regex4j and GNU 1.0.8 all accept [:] as the character set
containing just a ':'.

Is [:] a valid character set?

Regards
  Roger Millington


 


Legal Disclaimer:-

Please be aware that messages sent over
the Internet may not be secure and should
not be seen as forming a legally binding
contract unless otherwise stated.