# _*_ coding: utf-8 _*_
#__author__ = 'Alihanniba'
import re

pattern = re.compile(r'hello')

result1 = re.match(pattern, 'hello')
result2 = re.match(pattern, 'helloo al')
result3 = re.match(pattern, 'hell')
result4 = re.match(pattern, 'hello al')

if result1:
    print result1.group()
else:
    print 'result1 faile'

if result2:
    print result2.group()
else:
    print 'result2 faile'

if result3:
    print result3.group()
else:
    print 'result3 faile'

if result4:
    print result4.group()
else:
    print 'result4 faile'

