http://www.perlmonks.org?node_id=11112687

nickwest has asked for the wisdom of the Perl Monks concerning the following question:

Hello!
$_ = 'aaa bbb ccc ddd ccc eee'; (@qqq) = /(aaa.*?ccc)/g; print join("/n", @qqq);
result:
aaa bbb ccc

But I need one more output - 'aaa bbb ccc ddd ccc'
The string may consist more 'ccc' words.