Unicode property problems in RegExp

V

vnick

I have a problem with a relatively simple RE with Unicode Properties:

[280] tmp% perl -Dr -e '$f = "KURZ_1"; if ($f =~ /[_\d\p{IsUpper}]+/)
{print"$&\n"};' |& less

[281] tmp%

The RegExp debugger output shows this:

Matching REx `[_\d\p{IsUpper}]+' against `KURZ_1'
Matching stclass `ANYOF[0-9_{unicode}+utf8::IsDigit +utf8::IsUpper]'
against `KURZ_1'
Guessing start of match, REx `^_<' against
`/cadappl/perl/5.8.5/lib/5.8.5/utf8.pm'...
String not equal...
Match rejected by optimizer


So I made some more trials with UP RE's and their output is even
stranger:

[289] tmp% perl -e '$f = "KURZ"; if ($f =~ /[\p{IsUpper}]+/) {print
"$&\n"};'

@8(p
[290] tmp% perl -e '$f = "KURZ"; if ($f =~ /\p{IsUpper}+/) {print
"$&\n"};'

[291] tmp% perl -e '$f = "KURZ"; if ($f =~ /\p{IsLu}+/) {print
"$&\n"};'
@4v
[292] tmp% perl -e '$f = "KURZ"; if ($f =~ /(\p{IsLu}+)/) {print
"$1\n"};'
@1îd
[293] tmp% perl -e '$f = "KURZ"; if ($f =~ /[A-Z]+/) {print "$&\n"};'
KURZ
[294] tmp%

Anybody out there who can tell me what is wrong here?
Thanks
vnick
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,710
Latest member
bernietqt

Latest Threads

Top