Created
June 20, 2013 09:46
-
-
Save janbaer/5821550 to your computer and use it in GitHub Desktop.
Find a specific content of a file with a regular expression in powershell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cls | |
$path = 'd:\Git\sp' | |
$file = '*.csproj' | |
$regex = "^.*(?=Output).*\.dll</HintPath>" | |
Get-ChildItem -Path $path -Name $file -Recurse | where {(get-Content $_ | Select-String $regex)} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This regular expression finds all files that contains a reference that not contains 'ThirdPartyLibraries'