in reply to use of 'or' in regex
Why not use your regex to ask the same question of Perl itself?
#!/usr/bin/perl -w use strict; my $str = 'DPL1 DPLx RVLj ILKy VLKy Bartleby the ScriFVKner'; while ($str=~ /(DPL.|RVL.|[IV]LK.|FVK.)/g){ print "matched '$1' in string '$str'\n"; }
|
---|
In Section
Seekers of Perl Wisdom