Constructs a regular expression using an "and" operation, using positive forward lookaheads.
ONCE: my $regex = join "", "^(?s)", map "(?=.*?\Q$_\E)", @words; $regex = qr/$regex/; ... AS_NEEDED: $found_all = $target =~ $regex;
In reply to Verify string contains ALL words in list by merlyn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |