f1131623_sion_Reference__Special_Groups__Description
[Feature] Implicit lookahead conditional [Syntax] (?(regex)then|else) where regex, then, and else are any valid regexes and regex is not the name of a capturing group [Example] (?(\d{2})7|c) matches the first 7 and the c in 747c [JGsoft] no [.NET] YES [Java] no [Perl] no [PCRE] no [PCRE2] no [PHP] no [Delphi] no [R] no [JavaScript] no [VBScript] no [XRegExp] no [Python] no [Ruby] no [std::regex] no [Tcl ARE] no [POSIX BRE] no [POSIX ERE] no [GNU BRE] no [GNU ERE] no [Oracle] no [XML] no [XPath] no [Description] 
If "regex" is not the name of a capturing group, then it is interpreted as a lookahead as if you had written (?(?=regex)then|else). If the lookahead succeeds, the "then" part must match for the overall regex to match. If the lookahead fails, the "else" part must match for the overall regex to match. The lookaround is zero-length. The "then" and "else" parts consume their matches like normal regexes.
Regular Expression Reference: Special Groups