此正则表达式用于删除所有 php 注释。你能检查一下正则表达式吗?
content = ""
with open(file_path, 'r') as content_file:
content = content_file.read()
re.sub(r"""(?|(?:#|//)([^\r\n]*)|/\*([\s\S]*?)\*/)""", "", content)
我的正则表达式有什么问题?谢谢。
此正则表达式用于删除所有 php 注释。你能检查一下正则表达式吗?
content = ""
with open(file_path, 'r') as content_file:
content = content_file.read()
re.sub(r"""(?|(?:#|//)([^\r\n]*)|/\*([\s\S]*?)\*/)""", "", content)
我的正则表达式有什么问题?谢谢。