I'm working in Java and having trouble matching a repeated sequence. I'd like to match something like:
a.b.c.d.e.f.g.
and be able to extract the text between the delimiters (e.g. return abcdefg) where the delimiter can be multiple non-word characters and the text can be multiple word characters. Here is my regex so far:
([\\w]+([\\W]+)(?:[\\w]+\2)*)
(Doesn't work)
I had intended to get the delimiter in group 2 with this regex and then use a replaceAll on group 1 to exchange the delimiter for the empty string giving me the text only. I get the delimiter, but cannot get all the text.
Thanks for any help!