use notepad ++ to modify a wordlist

  • hi as the title, I would like to modify a series of phrases and codes open with notepad ++, and keep the list only those phrases or codes greater than 9 characters.

    I found the “Replace” function, and this command:

    ^ [1-8] {1} $

    1-This does not work with all numbers why?
    2-To also erase the court that command phrases I have to give? Thanks?

  • This is not the right syntax.This I delete virtually every sentence

    how can I set this array?

  • @Raccolta-Giochi-Pc-Profilo If you would show an example of the text as it is and as it should look after the change, I’m sure @guy038 will show you how to do it with a proper regular expression! :-)

  • Assuming each of the phrases/codes is on its own line in N++ with no leading or trailing spaces, this should find all those from one to eight characters:


    The “.” means “any character” and the “{1,8}” means “anywhere from one to eight times.”

    If there are leading or trailing spaces, this might work as an alternative:


  • Hello Raccolta Giochi Pc Profilo

    To delete any line of a file, included empty lines, which is smaller than 10 characters, just follow the few steps, below :

    • Move back to the very beginning of your file ( CTRL + Origin )

    • Open the Replace dialog ( CTRL + F )

    • Uncheck the . matches newline option , if necessary

    • Set the Regular expression search mode

    • In the Find what zone, type in ^.{0,9}\R

    • Leave the Replace with zone EMPTY

    • Click on the Replace All button

    Et voilà !

    Notes :

    • The dot . represent any standard character, different of End of Line character(s)

    • The {0,9} is a quantifier that means from 0 to 9 times the previous character ( the dot )

    • The \R syntax stands for any kind of End of Line character(s), that is to say :

      • The two Windows “End of Line” characters \r\n

      • The Unix “End of Line” character \n

      • The Old Mac “End of Line” character \r

    Best Regards,


    P.S. :

    You’ll find good documentation, about the new Boost C++ Regex library, v1.55.0 ( similar to the PERL Regular Common Expressions, v1.48.0 ), used by Notepad++, since its 6.0 version, at the TWO addresses below :

    • The FIRST link explains the syntax, of regular expressions, in the SEARCH part

    • The SECOND link explains the syntax, of regular expressions, in the REPLACEMENT part

    You may, either, look for valuable informations, on the sites, below :

  • To practice regular expressions go to You can sign up and store the regex you create, or store them in a public library visible to all users. It’s really neat! It explains every part of the regex for you and has a nice help facility. So it’s great for beginners and advanced regexers.

Log in to reply