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

How regex works in array mode?

by astronogun (Sexton)
on Apr 26, 2012 at 07:01 UTC ( [id://967250]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    my @lines = ("ip:192.168.243.1", "ip:192.168.243.2" =~ /(ip:([0-9]{3}|
    +[0-9]{2}|[0-9]{1})\.([0-9]{3}|[0-9]{2}|[0-9]{1})\.([0-9]{3}|[0-9]{2}|
    +[0-9]{1})\.([0-9]{3}|[0-9]{2}|[0-9]{1}))/);
    
    print "@lines\n";
    
  2. or download this
    ip:192.168.243.1 ip:192.168.243.2 192 168 243 2
    

Log In?
Username:
Password:

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

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

    No recent polls found