Code: Select all
findstr /m /R "[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]" *.txt
I thought about printing them to a file and using "34.*" but is there another way?
Moderator: DosItHelp
Code: Select all
findstr /m /R "[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]" *.txt
Code: Select all
set "first2digits=34"
for /f "tokens=1* delims=:" %%i in ('findstr /rb "%first2digits%[0-9][0-9][0-9][0-9][0-9][0-9]" *.txt') do echo %%j
I thought /m would print the filename containing the string(s)
Code: Select all
findstr /rb "%first2digits%[0-9][0-9][0-9][0-9][0-9][0-9]" *.txt
Code: Select all
findstr /rb "%first2digits%[0-9][0-9][0-9][0-9][0-9][0-9]\>" *.txt
Code: Select all
findstr /rb "%first2digits%[0-9][0-9][0-9][0-9][0-9][0-9]$" *.txt
Code: Select all
findstr /rb "%first2digits%[0-9][0-9][0-9][0-9][0-9][0-9] " *.txt
aGerman wrote:ShadowThief I assume the latter won't work without option c.
Code: Select all
findstr /rb /c:"[3][4][0-9][0-9][0-9][0-9][0-9][0-9] " *.txt
Code: Select all
findstr /rbc:"%first2digits%[0-9][0-9][0-9][0-9][0-9][0-9] " *.txt