我想使用来自string类型列中的多个记录的正则表达式从XML字符串替换span标记。
了解如何删除Ex:"<span class="TAGGED_ITEM " id="c1_ae1">"
将能够用空字符串替换"</span>"
。
这是输入。
<Item title="1234" xmlns="http://www.imsglobal.org/xsd/imsqti_v2p2">
<ItemBody>
<div class="item_text">
<div>
<span class="TAGGED_ITEM " id="c1_ae1">This is a map on a grid.</span>
<span class="TAGGED_ITEM " id="c1_ae2"> It shows a car.</span>
</div>
<span class="TAGGED_ITEM " id="c1_ae3"> It shows a car on Road.</span>
</div>
</ItemBody>
</Item>
这是输出。
<Item title="1234" xmlns="http://www.imsglobal.org/xsd/imsqti_v2p2">
<ItemBody>
<div class="item_text">
<div>
This is a map on a grid.
It shows a car.
</div>
It shows a car on Road.
</div>
</ItemBody>
</Item>
答案 0 :(得分:1)
答案 1 :(得分:1)