samedi 7 septembre 2019

Is there a pattern that matches n times with a part of itself? [on hold]

Excuse me if title isn't specific. I want a pattern that matches unlimited times of a pattern (sounds crazy:) but let me give you an example:) I want my pattern matches 1 and 1/3 and 1/3/3 and 1/5*5/6 etc. And I have tried this before:

Pattern = r'[0-9]+([*/][0-9]+)*'

Aucun commentaire:

Enregistrer un commentaire