4

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?

3
  • 1
    Is CheckAnagrEA a folder name? Commented Nov 3, 2014 at 17:16
  • 1
    Is the whole word a group of symbols contiguous only with ^ (beginning of line), $ (end of line) and space? Commented Nov 3, 2014 at 17:53
  • 1
    CheckAnagrEA is the name of the stored procedure i'm looking for Commented Nov 4, 2014 at 9:22

1 Answer 1

10

Try the pattern

\bCheckAnagrEA\b

\b matches a word boundary. See the documentation.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.