&& $part !~ m{ # Time or partial time (or period): ^(?:|P)T [012]\d (?:| :?[0-5]\d (?:| :?[0-5]\d ) ) (?:| [.,]\d+ )$ }x