Easiest solution is probably to use two regexes.
--while (<DATA>) { print if /foo/ && /bar/; } __DATA__ foo bar bar foo foo bar baz barbazfoo foofoobar
"The first rule of Perl club is you don't talk about Perl club."
In reply to Re: Regular expression and
by davorg
in thread Regular expression for two required words
by fsn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |