【问题标题】:Remove text pattern from the text file using PowerShell使用 PowerShell 从文本文件中删除文本模式
【发布时间】:2020-12-02 13:45:35
【问题描述】:

我有 1000 多个文件,它添加了不必要的代码,在 VS 解决方案中构建代码时会导致任何问题。

需要一种解决方案来从 1000 多个文件中替换/删除以下字符串

(

)

【问题讨论】:

    标签: powershell-3.0


    【解决方案1】:

    不了解 Powershell,但这可以在 Notepad++ 中轻松完成

    在“在文件中查找”选项中使用以下条目:

    Find what : with\r\n\r\n(\r\n\r\n)\r\n
    Replace with : <leave it blank>
    Filters : *.cs <or whatever is the extension of your files>
    Directory : <path where files are present>
    

    【讨论】:

      猜你喜欢
      • 2015-09-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-11-13
      • 1970-01-01
      相关资源
      最近更新 更多