Sam M
Mon, 30 Aug 2010 14:35:09 -0700
Hi Guys,I'd like remove contents between tags <email> that matches pattern "WORD1" as follows:
Change"stuff <email>word1-emai...@domain.com</email> more stuff <email>word1-emai...@domain.com</email> still more stuff <email>word2-emai...@domain.com</email> stuff after WORD2 <email>word1-emai...@domain.com</email>"
To"stuff more stuff still more stuff <email>word2-emai...@domain.com</email> stuff after WORD2 "
The following did not work newl = re.sub (r'<email>WORD1-.*</email>',"",line) Thanks in advance! _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor