#!/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
In reply to Re: Pattern matching problem
by Perl Mouse
in thread Pattern matching problem
by sjossie
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |