I'm using windows command prompt (cmd).
I have this file "myfile.txt" and i want to get the string in each line that match my pattern.
For instance, if i have this in "myfile.txt":
The file alpha_123.txt has been created
The file gama_234.txt has been created
The new file alpha_789.txt has been created
And if I search for "alpha", the result should be this:
alpha_123.txt
alpha_789.txt
For now i have this code:
findstr /c "alpha" myfile.txt
but it returns the full line, but i just want the specific string.
Thanks in advance!