Regex Help?

Chris plug.org at 2nerds.com
Mon Oct 10 12:08:22 MDT 2011


On Sat, Oct 8, 2011 at 1:19 PM, S. Dale Morrey <sdalemorrey at gmail.com>wrote:

> 12137 HOLIDAY PENGUIN FIGURINES 335 9.95 4.25 5.95 1 PR



If some (or all) of your fields are fixed width, the width qualifier {n}
operator might be useful (shown here pulling out the $item and $desc
fields):

 ($item, $desc, $page, $retail, $member, $wholesale, $pkgquan, $pkgunits)
    = /^(.{5}) (.{25}) (\S+) (\S+) (\S+) (\S+) (\S+) (.+)$/;


More information about the PLUG mailing list