Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: use of 'or' in regex

by mrbbking (Hermit)
on Jun 17, 2002 at 15:05 UTC ( #175093=note: print w/ replies, xml ) Need Help??


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"; }


Comment on Re: use of 'or' in regex
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://175093]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (10)
As of 2014-09-02 07:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (20 votes), past polls