in reply to Re^2: UTF8 versus \w in pattern matching
in thread UTF8 versus \w in pattern matching
Time for some tests, then:
use strict; use warnings; use Test::More tests => 2; my $str = "/i/\N{LATIN SMALL LETTER A WITH ACUTE}\N{LATIN SMALL LETTER + E WITH ACUTE}\N{LATIN SMALL LETTER I WITH ACUTE}\N{LATIN SMALL LETTE +R O WITH ACUTE}\N{LATIN SMALL LETTER U WITH ACUTE}\N{LATIN SMALL LETT +ER Y WITH ACUTE}z/pl"; my $re = qr/^([\/\p{Word}]+)/; like $str, $re, 'Matched'; $str =~ $re; is $1, $str, 'Capture group 1';
Both pass here on v5.20.3 x86_64-linux-thread-multi.
🦛
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: UTF8 versus \w in pattern matching
by mldvx4 (Hermit) on Jul 06, 2021 at 11:48 UTC | |
by hippo (Archbishop) on Jul 06, 2021 at 12:20 UTC | |
by mldvx4 (Hermit) on Jul 06, 2021 at 12:33 UTC | |
by hippo (Archbishop) on Jul 06, 2021 at 12:47 UTC | |
by mldvx4 (Hermit) on Jul 06, 2021 at 13:54 UTC | |
|