in reply to Regex: continuous matching positions

Check out the pos function. For example:

$str = "aaabcabcdebcaabebcb"; while($str =~ /(\w{3}bc\w{2})/g){ print "$-[1],$+[1],$1\n"; pos($str) = $-[1]+1; }
This sets the position to start looking for the next match to 1 past the start point of the previous match. And it gets you the output you want.