converting perl to python - simple questions.
Quinn Dunkan
quinn at necro.ugcs.caltech.edu
Sun Apr 25 13:28:22 EDT 1999
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)):
More information about the Python-list
mailing list