From: Sébastien Aperghis-Tramoni Date: Thu, 29 Jun 2006 17:46:57 +0000 (+0200) Subject: Small precision about \Q \E inside m//x X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1031e5dba2bc40203b5942f84d3d2bc335470dba;p=p5sagit%2Fp5-mst-13.2.git Small precision about \Q \E inside m//x Message-ID: <1151596017.44a3f5f105205@imp1-g19.free.fr> p4raw-id: //depot/perl@28450 --- diff --git a/pod/perlre.pod b/pod/perlre.pod index 04c92d5..c6dd30f 100644 --- a/pod/perlre.pod +++ b/pod/perlre.pod @@ -71,12 +71,13 @@ character is also treated as a metacharacter introducing a comment, just as in ordinary Perl code. This also means that if you want real whitespace or C<#> characters in the pattern (outside a character class, where they are unaffected by C), that you'll either have to -escape them or encode them using octal or hex escapes. Taken together, -these features go a long way towards making Perl's regular expressions -more readable. Note that you have to be careful not to include the -pattern delimiter in the comment--perl has no way of knowing you did -not intend to close the pattern early. See the C-comment deletion code -in L. +escape them (using blackslashes or C<\Q \E>) or encode them using octal +or hex escapes. Taken together, these features go a long way towards +making Perl's regular expressions more readable. Note that you have to +be careful not to include the pattern delimiter in the comment--perl has +no way of knowing you did not intend to close the pattern early. See +the C-comment deletion code in L. Also note that anything inside +a C<\Q...\E> stays unaffected by C. X =head2 Regular Expressions