Skip to content

[doc] Inconsistent documentation of \G #17674

@djerius

Description

@djerius

Where
perlre, perlretut

Description

perlretut warns that

Currently, the \G anchor is only fully supported when used to anchor to the start of the pattern.

whlie perlre provides an example showing \G being used at the end of a pattern:

while ($string =~ /(.\G)/g) {
    print $1;
}

without a similar warning.

There's no description of what not "fully supported" entails, and the example in perlre unaccompanied by a similar warning implies that it is fully supported.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions