Advertisement
Old-Lost

Matches filter

Mar 7th, 2020
488
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. filter Matches($pattern) {
  2. $_ | Select-String -AllMatches $pattern |
  3.   Select-Object -ExpandProperty Matches |
  4.   Select-Object -ExpandProperty Value
  5. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement