Python中则正则表达式

http://blog.csdn.net/carolzhang8406/article/details/6335072

http://www.iteedu.com/plang/python/pyrediary/5.php

s = '{"time":"11:59:33","s-ip":"m10.160.31.36"}'


p=re.compile('(?<=m\d+.\d+.\d+.\d+)')
#p=re.compile('\d+')
pm=p.search(s)
print(pm is None)
print(pm.group())

posted on 2016-05-26 21:08  momingliu11  阅读(357)  评论(0编辑  收藏  举报