去除括号内容
pat = re.compile('\(.*?\)’)
print pat.sub("", s, 1)
取括号内容
print re.findall('\((.*?)\)', s)[0]
文章标签 Python 获取尖括号内的信息 python 正则表达式 文章分类 Python 后端开发
pat = re.compile('\(.*?\)’)
print pat.sub("", s, 1)
print re.findall('\((.*?)\)', s)[0]
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M