f1131623_sion_Reference__Special_Groups__Description
[Feature] Relative conditional [Syntax] (?(-1)then|else) where -1 is a negative integer and then and else are any valid regexes [Example] (a)?(?(-1)b|c) matches ab, the first c, and the second c in babxcac [JGsoft] no [.NET] no [Java] no [Perl] no [PCRE] 7.2 [PCRE2] YES [PHP] 5.2.4 [Delphi] YES [R] YES [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] 
Conditional that tests the capturing group that can be found by counting as many opening parentheses of named or numbered capturing groups as specified by the number from right to left starting immediately before the conditional. If the referenced capturing group took part in the match attempt thus far, the "then" part must match for the overall regex to match. If the capturing group did not take part in the match thus far, the "else" part must match for the overall regex to match.
Regular Expression Reference: Special Groups