If you want an exact match, that's easy:
while (<DATA>){ print "matched\n" if /publish/ and /date/; }
But note that this would also match "the date was published on"...
If the order in which the words must occur is relevant, you could do
while (<DATA>){ print "matched\n" if /publish.*date/; }
In reply to Re^3: Match typo
by almut
in thread Match typo
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |