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 Gerald Klinkl <ge...@siemens.at> on 2001/01/19 11:16:22 UTC

Not a letter

Hi

I've tried to define a regular expression which
match all except letters and should work for
unicode too. I have tried

RE noLetter = new RE ("[:cntrl:]|[:digit:]|[:punct:]");
or
RE noLetter = new RE ("[^[:alpha:]]");

but nothing work like expected. In the first
case ^<> aren't match for example, in the second
case I got a RESyntaxException. Is there no
easy way to define a regular expression which
match all except letters like \P{IsApha} or
[^[:alpha:]] in perl?

Gerald

-- 
----------------------------------------------
Ing. Gerald Klinkl        Siemens Inc. Austria
Senior Consultant
Phone: +43-51707-47044,   Fax: +43-51707-56659
E-Mail: gerald.klinkl@siemens.at