in reply to Pattern matching problem

#!/usr/bin/perl use strict; use warnings; my $quart1 = "dftg"; my $quart2 = "ftgh"; while (<DATA>) { print if /(?:^|\s)(?=\S*$quart1)(?=\S*$quart2)/; } __DATA__ cedftghyjhg foo cedftghyjhg bar dftg ftgh
Perl --((8:>*