in reply to pattern matching

my ($uptime) = /(\d+ days?, \d+:\d+)/;
Should take care of most of your cases, including 1 day.

(This assumes that your original string is in the special variable $_ ).


You have moved into a dark place.
It is pitch black. You are likely to be eaten by a grue.

Replies are listed 'Best First'.
Re: Re: pattern matching
by Anonymous Monk on Jun 04, 2002 at 00:24 UTC
    sorry I forget to mention, this could be less than a day!