Category Archives: Python

Recursive Regex in Python

A recursive regular expression is a feature that allows the entire regex pattern or part of it to be re-executed on the remaining unmatched text. The syntax (?R) or (?0) defines recursive regex in Python. Don’t worry if that definition seems intimidating. It will get clear when we work on examples.

Continue reading