For example I have string:
aacbbbqq
As the result I want to have following matches:
(aa, c, bbb, qq)
I know that I can write something like this:
([a]+)|([b]+)|([c]+)|...
But I think i's ugly and looking for better solution. I'm looking for regular expression solution, not self-written finite-state machines.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…