@mdione can you also not just `len(r.match(‘foo’).groups())` and then do conditional logic with the len return?
Only reason why I would suggest that is what you’re doing visually looks strange and might be hard to remember why you were even doing it in the future. I say this as someone who has done this to themselves plenty lol