且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

PowerShell:过滤字符串列表

更新时间:2023-11-04 18:29:10

您可以考虑使用 -match 而不是 -like.-Match 更强大(基于正则表达式)并且会像您最初期望的那样工作:

You might consider using -match instead of -like. -Match is more powerful (regex based) and will work like you were initially expecting:

svn list -R PATHTOREPOSITORY | where {$_ -match 'stringtomatch'}