Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: RegEx needed

by Chief of Chaos (Friar)
on Nov 19, 2002 at 08:46 UTC ( [id://214055]=note: print w/replies, xml ) Need Help??


in reply to RegEx needed

Hi,
my suggestion on your problem :
#!/usr/local/bin/perl -w use strict; my @dat; while (<DATA>) { chomp; if (/(0x[a-zA-Z0-9]+)\s ([a-zA-Z0-9 ]+)\s (0x[a-zA-Z0-9]+)\s ([0-9\.]+)/x) { print "1. $1 \n"; print "2. $2 \n"; print "3. $3 \n"; print "4. $4 \n"; @dat = ($1,$2,$3,$4); } } __DATA__ 0x4300004 Universe Collects 0x4300021 1.2.13.44

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2024-04-19 11:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found