Regular Expressions 101

Community Patterns

-1

GitHub issue link

ECMAScript (JavaScript)
todo
Submitted by sadespresso - 9 months ago

Linux Uptime (match all possible cases with days, min and hours)

0

Regular Expression
ECMAScript (JavaScript)

/
^\s*\S+\s+up\s+(?<uptime>(?:\S+\s+day[s]?,\s+\d+:\d+|\S+\s+min)|\d+:\d+)
/
gm

Description

Loading markdown...
Submitted by Feruz Ibadullaev - a year ago
(Last modified 9 months ago)