develooper Front page | perl.perl5.porters | Postings from January 2008

[PATCH] \X is equivalent to an atomic group

Thread Next
From:
Moritz Lenz
Date:
January 5, 2008 08:35
Subject:
[PATCH] \X is equivalent to an atomic group
Message ID:
477FACF4.5030801@casella.verplant.org
In a regexp the \X is equivalent to (?>\PM\pM*), not to (?:\PM\pM*) as
stated in the docs.

You can test that with this snippet:

use charnames qw(:full);
$_ = "\N{LATIN SMALL LETTER A}\N{COMBINING ACUTE ACCENT}\N{COMBINING
GRAVE ACCENT}";
if (m/^\X.$/){
	print "\\X is equvialent to (?:\\PM\\pM*)\n";
} elsif (m/^\X$/){
	print "\\X is equvialent to (?>\\PM\\pM*)\n";
}

Attached patches (against 5.10.0) fix the documentation in perlre.pod
and perlunicode.pod. It's already correct in perlrebackslash.pod

Cheers,
Moritz


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About