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.
You can match that with: (\w)\1*