python自动化中 使用re 匹配接口返回的是文本类型的数据
时间:2021-04-01 14:21:41
收藏:0
阅读:17
import re
t =‘wwsererfgfgfh({"productId":"111111","wwww":"323243":{}})‘
# m = re.match("\W*productId[^:]*:\D*(\d+)", t)
# if m:
# print(m.group(1))
re_prodId=re.compile(r‘\"productId\":\"([^"]+)\"‘)
re=re_prodId.findall(t)
print(re)
原文:https://www.cnblogs.com/zhangjie198212/p/14605285.html
评论(0)