http://qs1969.pair.com?node_id=11140024


in reply to Re^2: 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

Makes sense to me...

'abcdef' =~ /b(.)(.)./ and print "end of entire match ", $+[0], " en +d of first group ",$+[1], " end of second group ", $+[2], "\n";

outputs:

end of entire match 5 end of first group 3 end of second group 4

This is exactly as expected.