in reply to Re: printing LAST_MATCH_START/@- LAST_MATCH_END/@+ array where regex match begin/end
in thread printing LAST_MATCH_START/@- LAST_MATCH_END/@+ array where regex match begin/end
thank's for the tip.
and works fine and get the expected results. good thank's :)))
However I find that that PerlDoc https://perldoc.perl.org/perlvar#Variables-related-to-regular-expressions
is a bit misleading when it says that indexes/positions before and after regex match can be found in the LAST_MATCH_START/@- and LAST_MATCH_END/@+ array by printing
again thank's for the tip :)))
However I find that that PerlDoc https://perldoc.perl.org/perlvar#Variables-related-to-regular-expressions
is a bit misleading when it says that indexes/positions before and after regex match can be found in the LAST_MATCH_START/@- and LAST_MATCH_END/@+ array by printing
print $+[0], " ",$+[1], " ", $+[2], "\n" ;
again thank's for the tip :)))
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: printing LAST_MATCH_START/@- LAST_MATCH_END/@+ array where regex match begin/end
by tybalt89 (Monsignor) on Dec 29, 2021 at 22:07 UTC |
In Section
Seekers of Perl Wisdom