python正则分组匹配

import re

s = '''
{"type":"buy","order_no":"2020061613141386691649969"}
'''
ret = re.search(r'"type":"(.*?)"', s)
print(ret.group())
print(ret.group(0))
print(ret.group(1))

 

posted @ 2020-07-02 14:32  wujf  阅读(389)  评论(0)    收藏  举报