Avatar ·

Recursion in regular expressions

📁 Advanced Python Topics, example, AI

Hello.
There is a regular expression (for example)

 / \\ (([^) (]+ | (? R))+ \\) /X    

(? R) means a recursive link to the regular expression itself. Is there a regular expression engine supporting such recursion for Java or Python?
Standard java.util.Regex and Python's regex module do not seem to support this mechanism.
The regular expression is taken.