I'm using Sublime Text to edit a batch file on Windows. I'd like to remove all of the lines that do not begin with ECHO
or REM
. I figure this must be possible with regular expressions, but I can't figure it out. Anybody?
From what I can understand, Sublime Text uses Python's regex engine.
This code matches all lines that don't begin with ECHO
and REM
:
^(?!(?:ECHO|REM)).*\s*
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With