首页 > 解决方案 > Powershell Select-String 包含通配符

问题描述

我需要使用 Select-String 来查找已知字符串,后跟 a/$后跟另一个已知字符串。

所以假设文字字符串 1 是X文字字符串 2 是Y,我如何查找字符串X/YX$Y在 powershell 中?

标签: regexpowershell

解决方案


PS C:\users\js> Echo a/b | Select-String a.b

a/b


PS C:\users\js> Echo 'a$b' | Select-String a.b

a$b

推荐阅读