atomiclkp.blogg.se

Notepad++ sort according to second value
Notepad++ sort according to second value








In replacement, the regex \1\t\t$0 rewrites the group 1 ( The extension part ), then two tabulation characters and, finally, the searched string, that is to say the name of each file, with its extension ( part $0 ) The remainder of the search regex (.+) catches the remainder of the standard characters of the current line ( The extension part ) which is stored as group 1, due to the couple of parentheses matches, from the beginning of the current line ^, a maximum, NON empty, of characters, till a literal dot character ( which must be escaped by an antislash character \ in order to be considered as literal ) So, if the filename would be, for instance, “”, this range would be the string will match only a single standard character and not an EOL character The two search regex begin with the modifier (?-s) ( No PCRE_DOTALL ) that ensures that the regex engine will consider the dot special character. Well, I’m back home and here are some explanations on the two S/R :

notepad++ sort according to second value

I’ve got to be out for a while ! But, when I’m home, I’ll add some explanations to my regexes, just in case that you’re not acquainted with regular expressions ! Yeah ! Here is our final text, sorted as expected :-)) apple.c

  • Again, open the Replace dialog and type the regex expressions, below :.
  • notepad++ sort according to second value

    => We get the sorted text, below : c apple.c Now, perform a classical sort with the menu option Edit > Line operations > Sort Lines Lexicographically Ascending.=> You should obtain the changed text, below : c apple.c Select the Regular expression search modeįill up the two fields Find what: and Replace with:, with the values, below : So, from your original text, below : apple.cįirst, move back to the very beginning of your file, containing a list of filenames ( Ctrl + Home )

    notepad++ sort according to second value

    Very easily, indeed ! you just need two S/R, in regex mode and a classical sort :-))










    Notepad++ sort according to second value