In Java, how to get all groups which is inside a group (regular expression).
For example:Using (([A-Z][a-z]+)+)([0-9]+) test a string : "AbcDefGhi12345".
Then get Result:
matches():yes
groupCount():3
group(1):AbcDefGhi
group(2):Ghi
group(3):12345
But I want to get String "Abc", "Def", "Ghi", "12345" respectively.
How can I do that by using regular expression?