Re: [Tutor] again... regular expression

2005-11-21 Thread Kent Johnson
lmac wrote: > Ok. There is an error i made. The links in the HTML-Site are starting > with good.php so there was no way ever to find an link. > > re_site = re.compile(r"good\.php.+'") > for a in file: > z = re_site.search(a) > if z != None: > print z.group(0) > > > This

[Tutor] again... regular expression

2005-11-21 Thread lmac
Ok. There is an error i made. The links in the HTML-Site are starting with good.php so there was no way ever to find an link. re_site = re.compile(r"good\.php.+'") for a in file: z = re_site.search(a) if z != None: print z.group(0) This will give me every line sta

Re: [Tutor] again... regular expression

2005-11-21 Thread Kent Johnson
lmac wrote: > Hallo. > I want to parse a website for links of this type: > > http://www.example.com/good.php?test=anything&egal=total&nochmal=nummer&so=site&seite=22";> > > - > re_site = re.compile(r'http://\w+.\w+.\w+./good.php?

[Tutor] again... regular expression

2005-11-21 Thread lmac
Hallo. I want to parse a website for links of this type: http://www.example.com/good.php?test=anything&egal=total&nochmal=nummer&so=site&seite=22";> - re_site = re.compile(r'http://\w+.\w+.\w+./good.php?.+";>') for a in file: