pos
ErrorsCollection

pos

Synthesised documentation from type/Match type/X/Str/Numeric

From type/Match

See Original text in context

Returns the current position as a string index into Match.target for a regex match in progress:

my $a = 'abcdef';
$a ~~ /b. {say $/.pos }../;     # OUTPUT: «3␤»

You should not use this method on a finished Match, as the output can be implementation specific or is, in any case, unspecified.

From type/X/Str/Numeric

See Original text in context

method pos(--> Int:D)

Gives the position into the string where the parsing failed.