From: quinn at necro.ugcs.caltech.edu (Quinn Dunkan)
Date: 25 Apr 1999 17:28:22 GMT
Subject: converting perl to python - simple questions.
References: <7fvagp$8lm$1@nnrp1.dejanews.com> <aahzFAr5Dt.MLF@netcom.com>
Message-ID: <slrn7i6k5r.aio.quinn@necro.ugcs.caltech.edu>
X-UID: 375                                                  

On Sun, 25 Apr 1999 15:51:29 GMT, Aahz Maruch <aahz at netcom.com> wrote:
>In article <7fvagp$8lm$1 at nnrp1.dejanews.com>,
> <sweeting at neuronet.com.my> wrote:
>>
>>   [python]
>>   if not (re.match('^\s$'), mytext)
>
>I think you want
>
>   if not (re.match('^\s$', mytext)) :
>or
>   if not (re.match('^\s*$', mytext)) :

Don't forget r'' in python when you have backslashes.

if not (re.match(r'^\s*$', mytext)):




