Skip to content

Instantly share code, notes, and snippets.

@thiagosanches
Created March 5, 2015 13:38
Show Gist options
  • Save thiagosanches/bdd280099b913d169cc3 to your computer and use it in GitHub Desktop.
Save thiagosanches/bdd280099b913d169cc3 to your computer and use it in GitHub Desktop.
Regex pattern with powershell
$files = Get-Content "file_name_with_a_list_of_file_names"
foreach ($file in $files) {
select-string -Path $file -Pattern ">([0-9]+)" -AllMatches|%{$_.Matches[0].groups[1].value}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment