Search code examples
cmdfindstr

How do I look for string containing "." in cmd?


I am aware that "." is a wild character, yet I need to find all lines ending with a string "ey.". When I write

findstr /e "ey." nameofthefile.txt

it prints lines that end for example with "ey,", while I need only a period, no commas. Is there a way to look for strings containing periods in cmd? Any help would be highly appreciated!


Solution

  • findstr /e /c:"ey."
    

    /c: find exact string (not REGEX)

    For more info, see for /?