Re: HELP - Stuck with a regex

2001-09-08 Thread Jeff 'japhy/Marillion' Pinyan
On Sep 8, Gary Luther said: >$line =~ s/\s{2,}(\w+(\s?\W?\w+)*).*?/$1/; I think you want to use something a bit simpler for the \w+... part: $line =~ s/\s{2,}(\S+(?:\s\S+)*).*/$1/; That gets non-whitespace (\S+) followed by any number of occurrences of a single whitespace followed by MORE no

HELP - Stuck with a regex

2001-09-08 Thread Gary Luther
I have the following line: REQUESTED DATE:LPD WRITE UP/OFF PARAMETERS RUN DATE: 09/06/01 16:30 Now this is just one manifestation of the line or similar lines. It may or may not have the REQUESTED DATE: phrase. It may or may not hav