PowerShell: filter string list

前端 未结 2 1245
太阳男子
太阳男子 2021-02-20 08:55

This seems like a very basic thing to do, but I am new to PowerShell and can\'t figure this out or find an example online...

I am trying to filter a list of strings. Thi

2条回答
  •  被撕碎了的回忆
    2021-02-20 09:32

    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'} 
    

提交回复
热议问题