From da067d09d3fdb97c13d8225f152a723962c9233e Mon Sep 17 00:00:00 2001 From: Hugo van der Sanden Date: Fri, 29 Mar 2002 16:53:27 +0000 Subject: Re: [DOC PATCH] Regex \G and POSIX restrictions Message-Id: <200203291653.g2TGrRp26588@crypt.compulink.co.uk> p4raw-id: //depot/perl@15608 --- pod/perlre.pod | 7 +++++-- pod/perlretut.pod | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'pod') 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-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 as -an lvalue. Currently C<\G> only works when used at the -beginning of the pattern. See L. +an lvalue: see L. 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, some +such uses (C, 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 \ 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 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 -- cgit v1.2.1