Community
    • Login

    Sort lines ascending

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    4 Posts 4 Posters 598 Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Jose Emilio OsorioJ Offline
      Jose Emilio Osorio
      last edited by

      Hi,

      How can I sort lines ascending with 2 conditions:

      Example (text original):
      0004;0000020
      0001;0000012
      0003;0000101
      0001:0000008

      Want (result):
      0001;000008
      0001;000012
      0003;000101
      0004;000020

      Thanks for your help.

      PeterJonesP Terry RT Neil SchipperN 3 Replies Last reply Reply Quote 0
      • PeterJonesP Online
        PeterJones @Jose Emilio Osorio
        last edited by

        @Jose-Emilio-Osorio ,

        Umm… the result you want is what you get when you sort lexicographically ascending.

        1 Reply Last reply Reply Quote 3
        • Terry RT Offline
          Terry R @Jose Emilio Osorio
          last edited by

          @Jose-Emilio-Osorio said in Sort lines ascending:

          How can I sort lines ascending with 2 conditions:

          Did you try your example with the Notepad++ sorting functions. It does work, however there may be instances where it doesn’t achieve the desired result. That’s because the Notepad++ sort function just sorts the characters reading across each line. There is no ability to template the different fields in each line to consider a “tiered” approach to sorting.

          Terry

          1 Reply Last reply Reply Quote 2
          • Neil SchipperN Offline
            Neil Schipper @Jose Emilio Osorio
            last edited by

            @Jose-Emilio-Osorio The (many!) sort commands are located under (menu) Edit -> Line operations.

            1 Reply Last reply Reply Quote 1

            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
            • First post
              Last post
            The Community of users of the Notepad++ text editor.
            Powered by NodeBB | Contributors