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

2006-03-23 Thread Arne Ludwig
Perhaps this is what he means: re.sub("http://[^/]*/","/","http://palle.fi/wing/walla.htm";) '/wing/walla.htm' -- http://mail.python.org/mailman/listinfo/python-list

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

2006-03-23 Thread Diez B. Roggisch
dongdong wrote: > to Diez B. Roggisch : > no, I won't to use this way, its efficiency is very low as I need to > replace all the 'http://mail.python.org/mailman/listinfo/python-list

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

2006-03-23 Thread dongdong
to Diez B. Roggisch : no, I won't to use this way, its efficiency is very low as I need to replace all the 'http://mail.python.org/mailman/listinfo/python-list

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

2006-03-23 Thread Diez B. Roggisch
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 -- http://mail.python.org

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

2006-03-23 Thread dongdong
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. -- http://mail.python.org/mailman/listinfo/python-list