I need some regex help, I can never seem to get these right!!!
i'm pulling a line of code from a linux server and need to pull two strings from the line of code.
A same line of code is:
17:34pm up 2 days 23:38, 1 user, load average: 0.12, 0.06, 0.05
Can someone assist me with a regex that will pull just the uptime? So everything after 'up ' and before the first ', ' so that would equal: 2 days 23:38
I also need to pull the load average, but just the first number (in the sample, it would everything after 'load average: ' and before the ', ' after 0.12?
Thanks in advance, I have tried a heap of reg testers and just can't get it right!