Is there a way to do nested regular expression in Python? For example I have
r1 = re.compile(r'SO ON')
can I have something like
r2 = re.compile(r'WHATEVER AND (r1)*')
to validate "WHATEVER AND SO ON" for this example.
I tried finding about this around but couldn't find any solution.