Regular Expression question: how to enumerate all matches?# Java - 爪哇娇娃
G*a
1 楼
I want to obtain all the possible matches of "a" from "aaaaa", that should be:
a
aa
aaa
aaaa
aaaaa
but "a+" does not do the the job, it only returns the longest match "aaaaa".
how can i get all the possible matches enumerated? Thanks!
a
aa
aaa
aaaa
aaaaa
but "a+" does not do the the job, it only returns the longest match "aaaaa".
how can i get all the possible matches enumerated? Thanks!