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.