Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^3: How to get correct regex

by BillKSmith (Monsignor)
on Jan 14, 2015 at 14:17 UTC ( [id://1113231]=note: print w/replies, xml ) Need Help??


in reply to Re^2: How to get correct regex
in thread How to get correct regex

Sorry for the late reply. I like your idea of a regex.
use warnings; use strict; while (<DATA>) { print "$1 $2 $3\n" if /^\s*(\d+)\s+\S+\s+(\d+)\s+\S+\s+(\w+|\w+\s\ +w+)\s*$/; } __DATA__ ..more text... ..more text... ..more text... Information Summary for Head #1, Site1: No. P Device Percent Name ----------- --- ------------ ------- ----------------- 1 F 14 0.06 OPEN 2 F 216 0.97 CONTACT 4 F 326 1.47 LEFT 5 F 232 1.05 MID 6 F 54 0.24 RIGHT 7 F 6 0.03 AT 8 F 6 0.03 AT_GHT 11 F 184 0.83 5DBLT 12 F 151 0.68 2P5D 21 P 21009 94.64 Bin P ..more text... ..more text... ..more text...
Bill

Replies are listed 'Best First'.
Re^4: How to get correct regex
by AtlasFlame (Novice) on Jan 15, 2015 at 11:32 UTC

    It's working great. Thanks Bill.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2024-04-25 14:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found