#! perl use strict; use warnings; use Data::Dump; my $string = 'The quick brown fox jumps over the house of the lazy dog'; my @matches = $string =~ /(?=(the .*? dog))/gi; dd \@matches; #### 19:36 >perl 1202_SoPW.pl [ "The quick brown fox jumps over the house of the lazy dog", "the house of the lazy dog", "the lazy dog", ] 19:37 >