Find everything between two XML tags with RegEx

前端 未结 5 1360
无人及你
无人及你 2020-11-27 13:02

In RegEx, I want to find the tag and everything between two XML tags, like the following:


    

        
5条回答
  •  有刺的猬
    2020-11-27 13:57

    It is not a good idea to use regex for HTML/XML parsing...

    However, if you want to do it anyway, search for regex pattern

    [\s\S]*?<\/primaryAddress>
    

    and replace it with empty string...

提交回复
热议问题