in reply to ensure ALL patterns in string
From the standpoint of clarity and maintainability, I'm not sure what you have now | in the OP isn't really best. But if you want an "all in one regex" solution, try something like:
See Look-Around Assertions in perlre; the Looking ahead and looking behind section in perlretut.c:\@Work\Perl\monks>perl -wMstrict -le "my $s = 'aZaXaYa'; ;; print 'all there' if $s =~ m{ \A (?= .*? X) (?= .*? Y) (?= .*? Z) }xm +s; " all there
... so that I can just add remove space separated patterns ...
I don't understand what this means.
Give a man a fish: <%-{-{-{-<
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: ensure ALL patterns in string
by previous (Sexton) on Jan 22, 2016 at 21:44 UTC |