Using 'FIND' in Notepad

  • Thread starter Thread starter Eric
  • Start date Start date
E

Eric

Hey out there.
Just wondering if there is any way to use the Find function in
Notepad, with a variable.
For example:
looking for string "error" but wanting to exclude "error=null"
I am reviewing a .txt file and have to search for the word 'error'.
However, sometimes the file contains "error=null" several hundred
times. I would like to be able to have the find search for "error"
except "error=null".
Can this be done with notepad?
Thanx in advance.
 
Hey out there.
Just wondering if there is any way to use the Find function in
Notepad, with a variable.
For example:
looking for string "error" but wanting to exclude "error=null"
I am reviewing a .txt file and have to search for the word 'error'.
However, sometimes the file contains "error=null" several hundred
times. I would like to be able to have the find search for "error"
except "error=null".
Can this be done with notepad?
Thanx in advance.

No, but, run the following batch:

@echo off
REM The next 2 lines are 1 line
for /f "Tokens=*" %%a in ('type filename.txt^|findstr /i /v
/c:"error=null"^|findstr /i /c:"error"') do (
@echo %%a>>newfile.txt


Jerold Schulman
Windows: General MVP
JSI, Inc.
http://www.jsiinc.com
 
Back
Top