Community Patterns

Community Library Entry

0

Regular Expression
Created·2023-06-19 16:46
Flavor·PCRE2 (PHP)

/
(?<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
Open regex in editor

Description

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

Submitted by Hessel Bierma