Regex problem

Oleg Broytmann phd at phd.pp.ru
Mon Oct 15 08:53:20 EDT 2001


On Mon, Oct 15, 2001 at 02:47:37PM +0200, Gustaf Liljegren wrote:
> But look what happens as soon as I add a space (or any other character)
> before:
> 
> >>> s3 = ' <a href="mypage.html">'
> >>> re.match(re_link, s3).group()
> Traceback (most recent call last):
>   File "<pyshell#7>", line 1, in ?
>     re.match(re_link, s3).group()
> AttributeError: 'None' object has no attribute 'group'

   http://www.python.org/doc/current/lib/matching-searching.html

Oleg.
---- 
     Oleg Broytmann            http://phd.pp.ru/            phd at phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.




More information about the Python-list mailing list