I would like to capture a string with the longest possible amount of one character followed by no more than two of another character. Example:
aaaaabbbbbbbb
Would capture:
aaaaabb, bb and b
I have tried:
(a*)(b)(?!\2{2})
but this is only grabbing the two b's like so:
bb