The built-in variables @-
and @+
hold the start and end positions, respectively, of the last successful match. $-[0]
and $+[0]
correspond to entire pattern, while $-[N]
and $+[N]
correspond to the $N
($1
, $2
, etc.) submatches.
The built-in variables @-
and @+
hold the start and end positions, respectively, of the last successful match. $-[0]
and $+[0]
correspond to entire pattern, while $-[N]
and $+[N]
correspond to the $N
($1
, $2
, etc.) submatches.