Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE2 (PHP >=7.3)

/
(?<twas>(?<twisting>[5])|(?<armstand>[6]))?(?<direction>[1-4])(?<flying>(?(twas)[ ]?|[0-1]))?(?<summersaults>[(]?(?:[1-9]|1[0-2]?)[)]?)(?<twists>[(]?(?:[1-9]|1[0-2]?)[)]?)?(?<position>[a-e])
/
iA

Description

Extracts the following properties from a properly formatted dive code as specified by the World Aquatics organisation.

Submitted by Hessel Bierma - a year ago