更新时间:2022-06-10 17:01:22
您可以像这样在 PowerShell 2.0 中使用 Select-String 来做到这一点:
You can do this using Select-String in PowerShell 2.0 like so:
Select-String F\d\d -input $string -AllMatches | Foreach {$_.matches}
不久前我有 要求在 MS Connect 上使用 -matchall
操作员,此建议已关闭,因为此评论已修复:
A while back I had asked for a -matchall
operator on MS Connect and this suggestion was closed as fixed with this comment:
这是通过 -allmatches 参数为选择字符串修复的."
"This is fixed with -allmatches parameter for select-string."