in reply to matching the date and time
Are you trying to match
?Tue Sep 5 10:26:44 GMT 2005
If this is so, then a more appropriate regexp might be:
/( # start selection \w{3} # Tue \s # one space \w{3} # Sep \s+ # one or more spaces \d+ # 5 (day, one or more digits) \s # one space \d+:\d+:\d+ # 10:26:44 \s+ # one or more spaces (?:\w+\s+)? # optional timezone GMT \d+ # year ) # end of selection /x # x - allows whitespace in regexp
Or as a one liner:
/(\w{3}\s\w{3}\s+\d+\s\d+:\d+:\d+\s+(?:\w+\s+)?\d+)/
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: matching the date and time
by pingme8705 (Acolyte) on Sep 12, 2005 at 08:55 UTC | |
by pingme8705 (Acolyte) on Sep 15, 2005 at 02:25 UTC |