Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to delete all Lines not starting with.. [Notepad++]

Tags:

notepad++

I've got a rather large file (Over 1GB) which I'm trying to filter out the mass of. I'd like to delete all lines not containing a specific url in them.

I'm unsure how I'd do this and am not familiar with expressions in Notepad++ so as basic of an answer as possible would be great.

Edit: I'd like to do this for multiple files at once so if possible using the find in files tab would be best.

like image 380
user3471815 Avatar asked Mar 28 '14 08:03

user3471815


People also ask

How do I remove all lines?

Delete All LinesType %d and hit Enter to delete all the lines.

How do I delete everything before Notepad++?

Do you want to delete everything before the | and including the | character. You can try find: (. +\|) and leave replace empty.


1 Answers

You could do:

  1. Search the lines that contain the url:
    in the search box, give your url and in the tab "marks" click on Mark lines then search all
  2. Then in menu Search > Bookmark > invert bookmarks
  3. Then in menu Search > Bookmark > Remove bookmarked lines.

I haven't an english version of Noptepad++ so the name of functions could be a little bit different.

like image 104
Toto Avatar answered Nov 03 '22 16:11

Toto