Lets say we have this:
A2 A1 B. #1
A1 B. #2
A3 A1 A8 B. #3
How would I go about if I want:
- To match:
A2 A1 B.
andA1 B.
- To match:
A1 B.
- To match:
A3 A1 A8 B.
andA1 A8 B.
andA8 B.
So far I've got this regex:
A\d\s(.*\.)
But it won't match subsets of code that's already been matched (I'm matching using re.finditer
)/ My guess is that re.finditer
is doing just as its supposed to, and I'm just trying to force it into doing stupid stuff.