def print_re():
#p = re.compile(r'hello')
#p = re.compile(r'he')
#m = p.match('hello,wrold')
#print m.group()
print '========='
m1 = re.match(r'zheng','zhenghangjj')
print m1.group()
print '=====yi===='
p = re.compile(r'\d+')
r = p.split('one1two2shtee3four4')
print r
#['one', 'two', 'shtee', 'four', '']
#p1 = re.compile('one1two2shtee3four4')
p = re.compile(r'\d+')
print p.findall('one1two2shtee3four4five5')
#['1', '2', '3', '4', '5']
def print_sub():
'''
>> > re.sub('[abc]', 'o', 'Mark')
'Mork'
>> > re.sub('[abc]', 'o', 'rack')
'rook'
>> > re.sub('[abc]', 'o', 'caps')
'oops'
>> >
# >>> re.sub('[abc]','o','mastash',1)
'mostash'
>>>
'''
打开App,阅读手记