RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Hosting Spotlight

Sponsors

Regular Expression Details

Title Test Find Linux Uptime Command
Expression
/^([0-2][0-9]\:[0-5][0-9]\:[0-5][0-9])\s[u][p]\s([0-9]{1,4})\s[d][a][y][s]\,\s([0-9]{1,2}\:[0-5][0-9])\,\s\s([1-9]{1,4})\s[u][s][e][r]\,\s\s[l][o][a][d]\s[a][v][e][r][a][g][e]\:\s([0-9\.]{4,6})\,\s([0-9\.]{4,6})\,\s([0-9\.]{4,6})$/
Description
Take the output of the uptime command and split it into a useful array.
Matches
13:21:33 up 219 days, 1:11, 1 user, load average: 0.00, 0.00, 0.00 | 21:17:21 up 19 days, 9:34, 1 user, load average: 0.00, 0.00, 0.00 | 21:17:21 up 19 days, 9:34, 1 user, load average: 12.30, 5.02, 1.20
Non-Matches
13:21:33 up 219 days, 1:11, 1 user, load average: 0.00, 0.00, 0.00 | 21:17:21 up 19 days, 9:34, 1 user, load average: 0.00, 0.00, 0.00 | 21:17:21 up 19 days, 9:34, 1 user, load average: 12.30, 5.02, 1.20
Author Rating: Not yet rated. Sam Crookes
Source
Your Rating
Bad Good

Enter New Comment

Title
 
Name
 
Comment
 
Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Copyright © 2001-2010, RegexAdvice.com | ASP.NET Tutorials