Message260216
| Author |
Magesh Kumar |
| Recipients |
Magesh Kumar, ezio.melotti, mrabarnett |
| Date |
2016年02月13日.00:19:24 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1455322764.68.0.816067707271.issue26354@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
I am in the process of re.sub the tag <item type="dict"> </item> with empty string from a xml output line.
If "re.I" is used, I am not able to remove the complete tag.
========================================================================
>>> a
'ype="str">false</latency_statistics_enabled><name type="str">Default</name><aggregates type="list"><item type="dict"><aggregate type="list"><item type="dict"><type type="str">MulticastClient</item><is'
>>> b = re.sub('\<\/?item(\s+type="dict")?\>', '', a, re.I)
>>> b
'ype="str">false</latency_statistics_enabled><name type="str">Default</name><aggregates type="list"><aggregate type="list"><type type="str">MulticastClient</item><is'
>>> b = re.sub('\<\/?item(\s+type="dict")?\>', '', a)
>>> b
'ype="str">false</latency_statistics_enabled><name type="str">Default</name><aggregates type="list"><aggregate type="list"><type type="str">MulticastClient<is'
======================================================================== |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2016年02月13日 00:19:24 | Magesh Kumar | set | recipients:
+ Magesh Kumar, ezio.melotti, mrabarnett |
| 2016年02月13日 00:19:24 | Magesh Kumar | set | messageid: <1455322764.68.0.816067707271.issue26354@psf.upfronthosting.co.za> |
| 2016年02月13日 00:19:24 | Magesh Kumar | link | issue26354 messages |
| 2016年02月13日 00:19:24 | Magesh Kumar | create |
|