Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试匹配父节点中没有结束标记的所有 XML 节点。有人知道这样做的正则表达式吗?
一个简单的开始:
<.*?\/>
请注意,它将失败,例如:
<bar attr="oops/>"/>
但是,具有/>属性是非常罕见的情况,您总是可以逃避它们。
/>