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} $
question:
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
^[1-7{qwertyuiopasdfghjklzxcvbnm}]{1,}$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:
^.{1,8}$
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:
\b.{1,8}\b
-
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
\Rsyntax 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,
guy038
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 its6.0version, at the TWO addresses below :http://www.boost.org/doc/libs/1_48_0/libs/regex/doc/html/boost_regex/syntax/perl_syntax.html
http://www.boost.org/doc/libs/1_48_0/libs/regex/doc/html/boost_regex/format/boost_format_syntax.html
-
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 http://www.regex101.com. 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.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login