a question on re
Fredrik Lundh
fredrik at pythonware.com
Sat Apr 1 03:05:37 EST 2006
eight02645999 at yahoo.com wrote
> i tried to search 2 patterns
>
> pat1 = re.compile("blah")
> pat2 = re.compile("blah2")
>
>
> if i do
> if re.findall(pat1,something) and re.findall(pat2,something):
> do something
>
> if does not work
>
> but when i do a nest if,
>
> if re.findall(pat1,something) :
> if re.findall(pat2,something):
> do something
>
> it works..
>
> please advise on why the first code doesnt work.
is this the actual code you were using ? and the actual patterns ?
what's in "something" ?
</F>
More information about the Python-list
mailing list