in reply to Re: seeking improvement in my smiple program using regular expression
in thread seeking improvement in my smiple program using regular expression

hmmmm
My code works, but I thought writing out ([^ ]+)(?:\s+) 18 times was stupid
I thought there could be a way to do this
([^ ]+\s+){17}(\d{1,3})(?:\s+)
But clearly above is not correct..
your split code is neat though.. Let me look into that as well

Replies are listed 'Best First'.
Re^3: seeking improvement in my smiple program using regular expression
by FunkyMonk (Bishop) on Aug 05, 2007 at 12:56 UTC
    s/((?:\S+\s+){17})\d+(\s+\d+)$/$1$count$2/;