The above is a question from whizlab simulator. Can anyone please tell me how the output is coming to be 4? I thought the split method is supposed to split a string around matches of a regex. here regex is a{3} so doesnt that leave bb to be the two tokens.??
BUt how can a string of zero length be considered a token when I havent used any kind of greedy quantifier? And going by the explanation. there is a token on the left of the first ""aaa. Then why isnt there also a token just before the BB. like aaa""bb".? I hate regexing