You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oro-user@jakarta.apache.org by "Daniel F. Savarese" <df...@savarese.org> on 2001/06/12 19:07:25 UTC
Re: Posix char classes broken
> System.out.println(new Perl5Util().match("/[:digit:]/", "1"));
I think what you want is "[[:digit:]]" The POSIX class needs to appear
inside of a character class.
daniel
RE: Posix char classes broken
Posted by Adam Shackleford <ap...@sprynet.com>.
Eek! I deserve a thousand lashes with my copy of "Mastering Regular
Expressions" for that one!
I think RegExp (which I'm switching from) allows inline [:posix:], which is
definitely wrong.
thanks,
a
> -----Original Message-----
> From: Daniel F. Savarese [mailto:dfs@savarese.org]
> Sent: Tuesday, June 12, 2001 1:07 PM
> To: oro-user@jakarta.apache.org
> Subject: Re: Posix char classes broken
>
>
>
> > System.out.println(new Perl5Util().match("/[:digit:]/", "1"));
>
> I think what you want is "[[:digit:]]" The POSIX class needs to appear
> inside of a character class.
>
> daniel
>
>
new Perl5Util().match("/[[:alpha:]]/", "a") => false
Posted by Adam Shackleford <ap...@sprynet.com>.
The expression:
new Perl5Util().match("/[[:alpha:]]/", "a")
returns false with ORO 2.0.3, whereas:
new Perl5Util().match("/[[:alnum:]]/", "a")
returns true. I hope this isn't another newbie mistake...
thanks,
adam