Change 18293 by jhi@lyta on 2002/12/12 13:57:56

        Resolve [#perl 15774] by fiat: simply document that
        \C in lookbehind is unsupported.

Affected files ...

... //depot/maint-5.8/perl/pod/perlre.pod#3 edit
... //depot/maint-5.8/perl/pod/perlretut.pod#2 edit

Differences ...

==== //depot/maint-5.8/perl/pod/perlre.pod#3 (text) ====
Index: perl/pod/perlre.pod
--- perl/pod/perlre.pod#2~18080~        Sun Nov  3 21:23:04 2002
+++ perl/pod/perlre.pod Thu Dec 12 05:57:56 2002
@@ -188,6 +188,7 @@
     \C Match a single C char (octet) even under Unicode.
        NOTE: breaks up characters into their UTF-8 bytes,
        so you may end up with malformed pieces of UTF-8.
+       Unsupported in lookbehind.
 
 A C<\w> matches a single alphanumeric character (an alphabetic
 character, or a decimal digit) or C<_>, not a whole word.  Use C<\w+>

==== //depot/maint-5.8/perl/pod/perlretut.pod#2 (text) ====
Index: perl/pod/perlretut.pod
--- perl/pod/perlretut.pod#1~17645~     Fri Jul 19 12:29:57 2002
+++ perl/pod/perlretut.pod      Thu Dec 12 05:57:56 2002
@@ -1707,7 +1707,7 @@
 The last regexp matches, but is dangerous because the string
 I<character> position is no longer synchronized to the string I<byte>
 position.  This generates the warning 'Malformed UTF-8
-character'.  C<\C> is best used for matching the binary data in strings
+character'.  The C<\C> is best used for matching the binary data in strings
 with binary data intermixed with Unicode characters.
 
 Let us now discuss the rest of the character classes.  Just as with
@@ -2003,6 +2003,10 @@
     $x =~ /foo(?!bar)/;  # doesn't match, 'bar' follows 'foo'
     $x =~ /foo(?!baz)/;  # matches, 'baz' doesn't follow 'foo'
     $x =~ /(?<!\s)foo/;  # matches, there is no \s before 'foo'
+
+The C<\C> is unsupported in lookbehind, because the already
+treacherous definition of C<\C> would become even more so
+when going backwards.
 
 =head2 Using independent subexpressions to prevent backtracking
 
End of Patch.

Reply via email to