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
[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