python a="32<2>fdssa</2>ffdsa32" re.sub(r'<(\d+)>|</(\d+)>',"item",a)
python
a="32<2>fdssa</2>ffdsa32" re.sub(r'<(\d+)>|</(\d+)>',"item",a)
result:'32itemfdssaitemffdsa32'
如何正确替换得到结果: a="32<item>fdssa</item>ffdsa32"
<item>
</item>
繁星coding
红颜莎娜
相关分类