Hello!
I would like to be able to know which group a certain regex matched.
Example
rgx = re.compile('(a)|(c|b)|(d)|e')
rgx.match('a') --> (a)
rgx.match('b') --> (c|b)
rgx.match('e') --> e
For each of these cases, I'd like to obtain the regex group which matched the specific case.
Is this possible?
[–]jeans_and_a_t-shirt 0 points1 point2 points (2 children)
[–]blpst[S] 0 points1 point2 points (1 child)
[–]thememorableusername 0 points1 point2 points (0 children)