swapna
swapna

Reputation: 143

Delete numbers, special characters and text containing special characters in notepad++

I have few text files from which :

I need to delete all numbers(0 to 9), special characters(they are "{" and "[") and all the words containing a "#" ( for eg, good#boy, very#good#boy a#very#good#boy)

How can I do this with Notepad++? Thanks.

Upvotes: 0

Views: 2785

Answers (1)

psxls
psxls

Reputation: 6935

With the help of regular expressions it's easy. Go to Search > Replace menu (shortcut CTRL+H) and do the following:

  1. Find what:

    [0-9\{\}\[\]]|[a-zA-Z]+\#[a-zA-Z\#]+
    
  2. Replace with:

    [leave empty!]
    
  3. Select radio button "Regular Expression"

  4. Then press "Replace All"

You can test it at regex101.

Upvotes: 1

Related Questions