Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Problem with alternating regex?

by Anonymous Monk
on Sep 11, 2012 at 02:54 UTC ( [id://992906]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl --
    use strict; use warnings;
    use Data::Dump;
    ...
      "set zone id 100 \"Internet_Only\"",
      { 1 => "id 100 \"Internet_Only\"", 2 => undef },
    ]
    
  2. or download this
        use Text::Balanced qw/ :ALL /;
        my @parts = extract_multiple(
    ...
            ],
        );
        dd\@parts;
    
  3. or download this
    ["set zone ", "\"VLAN\"", " vrouter ", "\"trust-vr\""]
    ["set zone id 100 ", "\"Internet_Only\""]
    
  4. or download this
        my @parts = split /("[^"]*")/, $line;
        dd\@parts;
    
  5. or download this
    my @parts = split /((?:\"(?:\\\"|(?!\").)*\"|\'(?:\\\'|(?!\').)*\'))/,
    + $line;
    dd\@parts;
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2024-04-23 12:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found