All the errors detected are listed below, from left to right, as they appear in the pattern.
(?(DEFINE) Group is incomplete
? Quantifier cannot follow an opening parenthesis
\g Reference is missing a group name or number
| Parent construct has too many alternatives
\g Reference is missing a group name or number