I have a problem with a regex that has to capture a substring that it's already captured...
I have this regex:
(?<domain>\w+\.\w+)($|\/|\.)
And I want to capture every subdomain recursively. For example, in this string:
test1.test2.abc.def
This expression captures test1.test2
and abc.def
but I need to capture:
test1.test2
test2.abc
abc.def
Do you know if there is any option to do this recursively?
Thanks!