import re
class Retest:
def __init__(self,string,path):
self.string = string
self.path = path
def retest(self):
res = re.search(self.string,self.path,flags=0).group()
# res.group()
print res
return
if __name__ == '__main__':
a = 'helloworld'
b = 'he(.+)ld'
c = Retest(b,a)
c.retest()