Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
ECMAScript (JavaScript)

/
((?<text>\w+\sS-bane den\s*)(?<date>\d{1,2}\.\s\w+\s\d{4}))
/
gm

Description

Trafikstyring S-bane den 5. marts 2019

Extracts the date from a sting like the one above

Submitted by anonymous - 6 years ago