[PowerShell]Quote in String

今天遇到一个问题,如何在Select-String的Pattern参数里能使用双引号

比如 Select-String -path . -pattern "Lines: <span class="metric">100% <small>" 是不能工作的

查看了文档https://technet.microsoft.com/en-us/library/hh847740.aspx 得到的结论是使用backtick charater(`)

Select-String -path . -pattern "Lines: <span class=`"metric`">100% <small>"

原文地址:https://www.cnblogs.com/buhaiqing/p/4935285.html