I was tried to write regex in Sublime Text that find three match in
A1
A2
A3
B1
B2
B3
C1
C2
C3
1 match
A1
A2
A3
2 match
B1
B2
B3
3 match
C1
C2
C3
Of course, It can be handled with for example
((?:A\d\n)+|(?:B\d\n)+|(?:C\d\n)+)
Is there more smart approach to do it instead of just enumerating?