Regexp – delete all lines containing OR NOT containing…
January 15th 2015 (9 years ago)
I mostly use Sublime (for web work or just to edit some files) and I often have a a .txt file with a list of items with similar/same path or any other lists, that have many same entries i need to remove quickly, to obtain the list i need.
Sublime support Regular expressions(Read about Regex here), this becomes very simple task to perform, which goes like this:
Sublime support Regular expressions(Read about Regex here), this becomes very simple task to perform, which goes like this:
Delete all lines containing…
^.*YOUR_TEXT.*\n
Delete all lines NOT containing…
^((?!YOUR_TEXT).)*$