https://docs.python.org/2/library/types.html
mport re
import types
str = 'you are'
#str = 'you are my are not they are'
RE = re.compile(r'are')
match = RE.findall(str)
if match:
if type(match) is list:
print match
else:
print match.group()
else:
print "No match found"
No comments:
Post a Comment