in reply to Re^2: Grabbing specific string from a line
in thread Grabbing specific string from a line

Hmmm, is it possible to give a solution for any problem that will still hold if someone modifies the requirement? Considering that it's a given the length of the number is fixed, I wouldn't worry too much about it.

I'm also assuming the OP isn't a drooling idiot, and has the ability to add \s* to a pattern when required.

Replies are listed 'Best First'.
Re^4: Grabbing specific string from a line
by CountZero (Bishop) on Mar 02, 2012 at 06:37 UTC
    Given that whitespace has a low significance in XML, it is indeed a good idea to add some optional whitespace.

    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