Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
^P(?:(?P<years>[0-9\.]+)Y)?(?:(?P<months>[0-9\.]+)M)?(?:(?P<days>[0-9\.]+)D)?(?P<time>T(?:(?P<hours>[0-9\.]+)H)?(?:(?P<minutes>[0-9\.]+)M)?(?:(?P<seconds>[0-9\.]+)S)?)?$
/
gm

Description

no description available

Submitted by Jem North - 7 years ago