magic-unipaas

(Recursive?) Regex to remove empty xml tags

旧城冷巷雨未停 提交于 2019-12-13 07:48:54
问题 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 回答1: Try this