Hello.
There is a regular expression (for example)

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

(? R) means a recursive reference to the regular expression itself, where can I find a regular expression processor that supports such recursions for Java or Python?
The standard java.util.regex and Python regex seem to have no support for this mechanism.
Regular expression is taken here .

  • 2
    MOSH can be broken =) - Gorets
  • one
    Yes, it's a Lisp parser! :) Similar question: How can a recursive regexp be implemented in python? - Gordio
  • @gordio, on the stack, instead of the regular expression engine, they suggest using pyparsing, which is completely different. The author of the post on Habré uses Perl by the way, I will not say anything about Lisp. - ReinRaus

1 answer 1

https://pypi.python.org/pypi/regex
An alternative recursion python regular expression engine.

Java engine does not seem to exist at the moment.