On 3/20/2011 8:46 PM, Ken D'Ambrosio wrote:
Hey, all -- I know how to match and return stuff from a regex, but I'd like to do an if, something like (from Perl, sorry):if (/MatchTextHere/){DoSomething();} How do I accomplish this in Python?
Look at the doc to see what are the possible return values from the function you want to use and which indicates failure. Then test that the result is not the failure value.
-- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list