Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Problem with alternating regex?

by kcott (Archbishop)
on Sep 11, 2012 at 05:19 UTC ( [id://992922]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/env perl
    
    ...
    __DATA__
    set zone "VLAN" vrouter "trust-vr"
    set zone id 100 "Internet_Only"
    
  2. or download this
    $ pm_pref_quote_regex.pl
    Config line=> 1;    Value=> set zone "VLAN" vrouter "trust-vr";    zon
    +e=> VLAN
    Config line=> 2;    Value=> set zone id 100 "Internet_Only";    zone=>
    + Internet_Only
    
  3. or download this
    __DATA__
    set zone "VLAN" vrouter "trust-vr"
    ...
    blah
    blah blah set zone "extra" whatever
    blah blah blah "set zone id 12345 "extra2_a" something "extra2_b"
    
  4. or download this
    $ pm_pref_quote_regex.pl
    Config line=> 1;    Value=> set zone "VLAN" vrouter "trust-vr";    zon
    +e=> VLAN
    Config line=> 2;    Value=> set zone id 100 "Internet_Only";    zone=>
    + Internet_Only
    Config line=> 4;    Value=> blah blah set zone "extra" whatever;    zo
    +ne=> extra
    Config line=> 5;    Value=> blah blah blah "set zone id 12345 "extra2_
    +a" something "extra2_b";    zone=> extra2_a
    
  5. or download this
    $ perl -MYAPE::Regex::Explain -e '
    my $re = q{^set\szone\s("([^"]*)"|id\s\d+\s"([^"]*)")};
    ...
    ----------------------------------------------------------------------
    )                        end of grouping
    ----------------------------------------------------------------------
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2024-03-29 02:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found