[issue26354] re.I does not work as expected
New submission from Magesh Kumar: I am in the process of re.sub the tag 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">falseDefaultMulticastClient>> b = re.sub('\<\/?item(\s+type="dict")?\>', '', a, re.I) >>> b 'ype="str">falseDefaultMulticastClient>> b = re.sub('\<\/?item(\s+type="dict")?\>', '', a) >>> b 'ype="str">falseDefaultMulticastClient <http://bugs.python.org/issue26354> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26354] re.I does not work as expected
Magesh Kumar added the comment: Thanks for the inputs, It would be of great help, if someone could help me in explaining the below output : >>> a 'ype="str">falseDefaultMulticastClient>> b = re.sub('\', '', a, re.I) >>> b 'ype="str">falseDefaultMulticastClient <http://bugs.python.org/issue26354> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26354] re.I does not work as expected
Magesh Kumar added the comment: :-) Thanks a lot Matthew for the inputs. If we compare the first example () and the example, I am using re.I as the third element. But for the example, still I am not to get the substitution happening correctly. Could you pls, let me know the reason of change in behaviour. -- ___ Python tracker <http://bugs.python.org/issue26354> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26354] re.I does not work as expected
Magesh Kumar added the comment: Corrected Message : If we compare the first example () and the example, I am using re.I as the third element. But for the example, still I am able to get the substitution happening correctly. Could you pls, let me know the reason of change in behaviour. -- ___ Python tracker <http://bugs.python.org/issue26354> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26354] re.I does not work as expected
Magesh Kumar added the comment: Thanks Matthew. :-) -- ___ Python tracker <http://bugs.python.org/issue26354> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com