This is from the PHP manual regarding PCRE conditional subpatterns:
The two possible forms of conditional subpattern are:
(?(condition)yes-pattern)
(?(condition)yes-pattern|no-pattern)
That's OK as long as the condition is a digit or an assertion. But I don't quite understand the following
If the condition is the string (R), it is satisfied if a recursive call to the pattern or subpattern has been made. At "top level", the condition is false. (...) If the condition is not a sequence of digits or (R), it must be an assertion.
I would be grateful if someone could explain on an example what (R) is in conditional subpattern and how to use it. Thanks in advance.