Regular Expressions 101

什么值得买文章评论解析

Open Workspace
  • Python
  • Substitution
1

Regular Expression

r"""
<img[^>]*alt="([^"]+)"[^>]*>
"""
gm

Description

https://www.smzdm.com/p/23523045/p3/#comments

解析引用评论内容, 为保持表情顺序, 使用正则分步替换

Submitted by Anonymous