I want to come up with a command that searches my path variable and outputs the folders that include the search keyword. For example: I want to output all paths included in my path variable that include the word ‘python’ (case insensitive).
My path looks like this:
FilesMicrosoft VS Codebin;C:Program Files
Filesnodejs;C:Program FilesGitcmd;C:Program Files
Expected result would be:
So far, I have a regex formula that selects every path (see example here). The regex I have is:
If I try
path | findstr "C.*?;"
Nothing really comes out (shouldn’t it output all lines that match that regex?). Also, how would I go about outputting the paths that include the intended search keyword? Thanks
Source: Windows Questions