use strict; use warnings; my $re = qr{ ^ (?=.*foo) (?=.*bar) }x; while (my $line = <DATA>) { print $line if $line =~ $re; } __DATA__ foo bar foo bar bar foo abc foo bar
In reply to Re: Need RegExp help - doing an AND match
by imp
in thread Need RegExp help - doing an AND match
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |