method pos

Documentation for method pos assembled from the following types:

class Match

From Match

(Match) method pos

method pos()

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

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

You should not use this method on finished Match, as the output can be implementation specific.

class X::Str::Numeric

From X::Str::Numeric

(X::Str::Numeric) method pos

method pos(--> Int:D)

Gives the position into the string where the parsing failed.