I work in Java and have difficulty repeating the sequence. I would like to map something like:
a.b.c.d.e.f.g.
and be able to extract text between the delimiters (for example, return abcdefg), where the delimiter can be several non-capital characters, and the text can be several characters of the word. Here is my regex:
([\\w]+([\\W]+)(?:[\\w]+\2)*)
(Does not work)
I intended to get the separator in group 2 with this regular expression, and then use replaceAll in group 1 to exchange the separator for an empty string giving me only text. I get a separator but cannot get all the text.
Thanks for any help!
source
share