Sunday, January 04, 2009

regex on python

import re

regex = re.compile('^python$')
if regex.match('python'):
'Yes'
else:
'No'

No comments: