收起
re是python内置的依赖包,不需要安装。
import re res = re.match("h", "hello") if res: print(f"Matched: {res.group()}") # 输出: Matched: h else: print("No match")
报告相同问题?