import re word_string = """ <head>iph</head> """ regular = "<.*?>((\w*)(<.*?>))" result = re.sub(regular, lambda x:x.group(2), word_string) print(result) 运行结果: iph Process finished with exit code 0
您的电子邮箱地址不会被公开。 必填项已用*标注
评论 *
显示名称 *
电子邮箱地址 *
网站地址
在此浏览器中保存我的显示名称、邮箱地址和网站地址,以便下次评论时使用。