my $string = "xxxx yy zzzzz xxxx qqq"; my @array = ( $string =~ /(\b..?\b) (\b....?\b) (\b...?\b)/sg ); print @array; # produces nothing. # I have also tried rewriting it without success: it may # produce results, but not the right ones! (not the exact # sequence) # also if the string were longer it should produce # the sequence repeated: # "xxxx yy zzzzz xxxx qqq xxxx yy zzzzz xxxx qqq" # should produce "yy xxxx qqq yy xxxx qqq" etc etc # until we run out of text.