another newbie question - regex

Frank Niessink frankn=nuws at cs.vu.nl
Mon Dec 25 09:02:11 EST 2000


Jacek Pop?awski <jp at ulgo.koti.com.pl> wrote:

> then why:

>>>> print re.search(s,".*")
> None
>>>> print re.match(s,".*")
> None


Try reverse the arguments:

>>> import re
>>> s = 'Hi there!'
>>> m = re.search(".*", s)
>>> m.group()
'Hi there!'


Cheers, Frank
-- 
Reverse engineering. To me the flow of time is irrelevant. You decide what you
want. I then merely make sure that it has already happened.
	-- Douglas Adams, 'Mostly Harmless'



More information about the Python-list mailing list