Luigino
Luigino

Reputation: 779

Notepad++ - delete all lines with certain text

I have notepad++ 5.8.2 and I was trying to remove all lines starting with 'Processed XXXXX total records' where XXXXX is a various number.
I tried to CTRL+H and put 'Processed.$ in Find what selecting Regular Expression and putting blank in Replace with but it doesn't even find those lines Processed. Did I do something wrong in regex expression to find and replace them?

Upvotes: 6

Views: 20265

Answers (4)

Pedro Lobito
Pedro Lobito

Reputation: 99041

This will help you:

  1. Press CTRL + H
  2. Select Regular Expression at the bottom
  3. Find ^Processed \d+ total records.*?
  4. Click Replace All

After, you may want to clean all the blank lines:

  1. Find ^\s*
  2. Click Replace All

Upvotes: 4

C0ppert0p
C0ppert0p

Reputation: 702

Depending on what eol designation you use this will delete the line, and leave no blank line.

^Processed\d+ total records.*$\n or
^Processed\d+ total records.*$\r\n

Upvotes: 0

Luigino
Luigino

Reputation: 779

Nevermind,... found it right now... Had just to do .Processed.*$ with Regular Expression and it replaced with blank line then removed blank lines with TextFX integrated plugin

Upvotes: -1

aelor
aelor

Reputation: 11126

^Processed \d+ total records.*$

search and replace with blank.

Upvotes: 3

Related Questions