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
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…