in reply to Regex help

Your regex works OK on the data you provided: you will find the first field in $2.

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

My blog: Imperial Deltronics

Replies are listed 'Best First'.
Re^2: Regex help
by Kenosis (Priest) on May 20, 2012 at 15:06 UTC

    The Perl that can be spoken of is not the Eternal Perl... (Update: An adaptation from the Tao Te Ching, Chapter 1.)

      In the same vein:
      The variable that can be named
      Is not the Eternal variable
      Variable references?

      CountZero

      A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

      My blog: Imperial Deltronics