diff options
author | Hugo van der Sanden <hv@crypt.org> | 2002-03-29 16:53:27 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-03-29 17:21:22 +0000 |
commit | da067d09d3fdb97c13d8225f152a723962c9233e (patch) | |
tree | 7118f4c1d9781e0e4be9181fb4834399b3e15a12 /pod | |
parent | 09b4b06f68b4d63ea97818c519b727c797884242 (diff) | |
download | perl-da067d09d3fdb97c13d8225f152a723962c9233e.tar.gz |
Re: [DOC PATCH] Regex \G and POSIX restrictions
Message-Id: <200203291653.g2TGrRp26588@crypt.compulink.co.uk>
p4raw-id: //depot/perl@15608
Diffstat (limited to 'pod')
-rw-r--r-- | pod/perlre.pod | 7 | ||||
-rw-r--r-- | pod/perlretut.pod | 3 |
2 files changed, 7 insertions, 3 deletions
diff --git a/pod/perlre.pod b/pod/perlre.pod index fef8ce3b6f..f2ce3ffff1 100644 --- a/pod/perlre.pod +++ b/pod/perlre.pod @@ -349,8 +349,11 @@ It is also useful when writing C<lex>-like scanners, when you have several patterns that you want to match against consequent substrings of your string, see the previous reference. The actual location where C<\G> will match can also be influenced by using C<pos()> as -an lvalue. Currently C<\G> only works when used at the -beginning of the pattern. See L<perlfunc/pos>. +an lvalue: see L<perlfunc/pos>. Currently C<\G> is only fully +supported when anchored to the start of the pattern; while it +is permitted to use it elsewhere, as in C</(?<=\G..)./g>, some +such uses (C</.\G/g>, for example) currently cause problems, and +it is recommended that you avoid such usage for now. The bracketing construct C<( ... )> creates capture buffers. To refer to the digit'th buffer use \<digit> within the diff --git a/pod/perlretut.pod b/pod/perlretut.pod index 4ea9ecc497..f0b5d1d389 100644 --- a/pod/perlretut.pod +++ b/pod/perlretut.pod @@ -1403,7 +1403,8 @@ off. C<\G> allows us to easily do context-sensitive matching: The combination of C<//g> and C<\G> allows us to process the string a bit at a time and use arbitrary Perl logic to decide what to do next. -Currently, the C<\G> anchor only works at the beginning of a pattern. +Currently, the C<\G> anchor is only fully supported when used to anchor +to the start of the pattern. C<\G> is also invaluable in processing fixed length records with regexps. Suppose we have a snippet of coding region DNA, encoded as |