6 Mar
2002
6 Mar
'02
11:07 a.m.
Hey! I'm working up a quick re to give me the folder above a webpage... For instance: ### I want: http://www.the.net/bigfolder/ ### import re url = "http://www.the.net/bigfolder/somepage.html" htmlfile = re.compile("/\w*\.html") htmlfile.match(href_url) if htmlfile: folder_url = htmlfile.sub(href_url, "/") For some reason I cannot get my re to do this right... I goit a bunch of hits while searching that indicated many people were having trouble with re in 2.2 python. Is this the case? Anyone know what the syntax is to compile that re? TIA -ed-