Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Re: Re: regex "o" modifier

by edoc (Chaplain)
on May 07, 2003 at 01:14 UTC ( [id://256092]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    perl -e 'my $re = qr!yes|no!; print "$re\n";'
    prints: (?-xism:yes|no)
    
  2. or download this
    my $re = qr!yes|no!;
    print "yes or no!\n" if "yes" =~ $re;
    print "yes or no only" if "maybe" !~ $re;
    print "polite yes or no\n" if "yes thankyou" =~ /$re thankyou/;
    
  3. or download this
    my $re = qr!yes|no!;
    my $re2 = qr!\sthankyou!;
    print "yes or no!\n" if "yes" =~ $re;
    print "yes or no only" if "maybe" !~ $re;
    print "polite yes or no\n" if "yes thankyou" =~ /$re$re2/;
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2024-04-18 20:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found