question: how to clare the absolute url in a html file

Diez B. Roggisch deets at nospam.web.de
Thu Mar 23 13:40:17 CET 2006


dongdong wrote:

> is there any lib to help to clear the absolute url in a html file? for
> example, 'http://www.sina.com/' should be clear ,but "/image/asd.gif"
> should be reserved.

Built-in string-manipulation is your friend:

"abcdef/ghi".replace("abcdef", "")


Diez



More information about the Python-list mailing list