我想从 VB.NET 应用程序中删除 PHP 源文件中的所有注释。另一个 stackoverflow 问题展示了如何在 C# 代码中执行此操作
我想出了这个转换,但不幸的是它不起作用:
Dim blockComments As String = "/\*(.*?)\*/"
Dim lineComments As String = "//(.*?)\r?\n"
Dim strings As String = """((\\[^\n]|[^""\n])*)"""
Dim verbatimStrings As String = "@(""[^""]*"")+"
regex = New Regex(blockComments & "|" & lineComments)
srcT = regex.Replace(srcT, "")