XML : (Recursive?) Regex to remove empty xml tags

I'd like to remove all empty tags from an xml file. However, my options are very limited, so I'd like to use a regex (which is available and known internally here).

I have no problem with the regex to remove the empty tags in their variations, but the nested empty tags are a bit harder, as my regex will only go one deep.

I believe it's because of the named capture group in my recursion, but I'm not able to fix it.

This is what I have so far: here

Best regards and thanks,

Laurent

No comments:

Post a Comment