Regex Help?

Alan Young alansyoungiii at gmail.com
Sat Oct 8 13:55:56 MDT 2011


On Sat, Oct 8, 2011 at 13:19, S. Dale Morrey <sdalemorrey at gmail.com> wrote:
> Here is an example of what I'm looking at.
> Item Item Description Page # Retail Member Wholesale Pkg
> 12137 HOLIDAY PENGUIN FIGURINES 335 9.95 4.25 5.95 1 PR

If the last fields are well known/defined you could do something like
(based entirely on the above example).  This is perl, adjust as
desired.

my @data = $line =~
/^(\d+)\s+(.*?)\s+(\d+)\s+([\d\.]+)\s+([\d\.]+)\s+([\d\.]+)\s+([\d\.]+)(.*)$/
-- 
Alan Young


More information about the PLUG mailing list