Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
ECMAScript (JavaScript)

/
(?:(?:(\d+):)?(?:(\d+):))?(\d+)(?:\.(\d+))?
/
gm

Description

Any number of digits is allowed for every component. Valid examples: 42 => group 3 43.5 => group 3,4 01:02:03.04 => group 1,2,3,4 62:3.04 => group 2,3,4 4711:0815:42 => group 1,2,3

Submitted by eumelzocker - 2 years ago (Last modified 2 years ago)