in reply to Re: parsing etime field from solaris ps
in thread parsing etime field from solaris ps
I can't believe I wrote {0,1} :) Your clean up is not quite right though- probably because I didn't give enough information to start with. $dd is not zero padded and whilst the man page says $mm is zero padded (on solaris 8 at least) it isn't zero padded when the etime is less than an hour.
/^(?:(\d+)-)?(?:(\d+):)?(\d+):(\d+)$/;
which is way better than what I had, thanks.--
Life is a tale told by an idiot -- full of sound and fury, signifying nothing. William Shakespeare, Macbeth
|
|---|