Regular Expressions 101

Community Patterns

106

trim

ECMAScript (JavaScript)
trim string
Submitted by fp - 10 years ago
4

url

ECMAScript (JavaScript)
no description available
Submitted by anonymous - 9 years 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)