Changing every other instance of <B> in a file

Lars Klæboe larskl at klassekampen.no
Tue Mar 27 11:03:45 EST 2001


On 27 Mar 2001 17:20:09 +0200, Carel Fellinger <cfelling at iae.nl> wrote:
>Lars Klæboe <larskl at klassekampen.no> wrote:
>...
>> 	Blablabla <B> talktalk <B> blabla blabla balbalblabla
>
>> The resulting file.html (html)
>
>> 	Blablabla <B> talktalk </B> blabla blabla balbalblabla
>
>> As you can tell, every other instance of <B> is to be changed into </B>.
>
>Let's hope those B-tags aren't nested, then the following might work:

No they aren't nested.

Why haven't I thought of dictionaries before ? Ever ?
In any programming context ? At all ? </ashamed> ;)

Thanks !

-- 
Lars Klæboe





More information about the Python-list mailing list