>>>I will not pretend I understand, but it does indeed work (for that test, at least). >> >>Well, regex always tries to find the longest match - that is why it went up to the second func >> >>I added a ? in the data group >> >>read about the quantifiers *?, +? and ?? https://docs.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-language-quick-reference#quantifiers > >Thanks again and for the reference. I will also need to test more cases, because what if I have some nested XML (e.g sample of >