I'm trying to find all the file starting with dt and extension c* that have this precise string inside "CheckAnagrEA" The problem is that this cmdlet returns also files that have "CheckAnagrEAInsert" etc.
Here's the code:
$cnt = Get-ChildItem $githubfolder -Filter DT*.c* -Recurse -Exclude *.sql | Select-String -pattern "CheckAnagrEA"
How can i find ONLY the wholeword?
Try the pattern
\bCheckAnagrEA\b
\b
matches a word boundary. See the documentation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With