Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8670867
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T18:48:36+00:00 2026-06-12T18:48:36+00:00

I’m working with a text file with 200.000+ lines in Notepad++. Each line has

  • 0

I’m working with a text file with 200.000+ lines in Notepad++. Each line has only one word. I need to strip out and remove all words which only contains one letter (e.g.: I) and words which contains only two letters (e.g.: as).

I thought I could just pas in regular regex like this [a-zA-Z]{1,2} but I does not recognize anything (I’m trying to Mark them).

I’ve done manual search and I know that there do exists words of that length so therefor can it only be my regex code that’s wrong. Anyone knows how to do this in Notepad++ ???

Cheers,
– Mestika

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T18:48:37+00:00Added an answer on June 12, 2026 at 6:48 pm

    If you want to remove only the words but leave the lines empty, this works:

    ^[a-zA-Z]{1,2}$
    

    Replace this with an empty string. ^ and $ are anchors for the beginning and the end of a line (because Notepad++’s regexes work in multi-line mode).

    If you want to remove the lines completely, search for this:

    ^[a-zA-Z]{1,2}\r\n
    

    And replace with an empty string. However, this won’t work before Notepad++ 6, so make sure yours is up-to-date.

    Note that you will have to replace \r\n with the specific line-endings of your file!

    As Tim Pietzker suggested, a platform independent solution that also removes empty lines would be:

    ^[a-zA-Z]{1,2}[\r\n]+
    

    A platform-independent solution that does not remove empty lines but only those with one or two letters would be:

    ^[a-zA-Z]{1,2}(\r\n?|\n)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working with lines of text in a csv file similar to this: 2012-03-16
I'm working on a 1 Gigabyte JSON text file which I'm trying to parse
I am working with a matlab project. And I have a text file like
I am working on an android game. I want to copy a text file
Here's the text of the file I'm working with: (4 spaces)Hi, everyone (1 tab)yes
I'm working on some doc file, that when copied and pasted into a text
I'm working on a text editor in ruby, and I need to support a
I have a text file with numbers: two numbers on each row, separated by
Working on a basic form to text file evite list type of thing. Everything
I have a text file having a list of around 150 to 200 file

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.