Community
    • Login

    How can I remove in a txt file all the spaces in each line after the last character?

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    5 Posts 4 Posters 9.8k Views 1 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.
    • CletosC Offline
      Cletos
      last edited by

      How can I remove in a txt file all the spaces in each line after the last character?

      E.g. in a txt file:
      1 A single line
      2 A single line with different lengths
      3 A single line with different lengths, characters

      So remove all spaces in the 1. line after the last “e”, in the 2. after the last “s” and in the 3. after the last “s”.

      andrecool-68A 1 Reply Last reply Reply Quote 0
      • andrecool-68A Offline
        andrecool-68 @Cletos
        last edited by

        Imgur

        Alan KilbornA 1 Reply Last reply Reply Quote 3
        • guy038G Offline
          guy038
          last edited by guy038

          Hello @cletos and All,

          I think that @andrecool-68 made a little mistake in his answer !

          From your post, you’ll have to perform the option :

          Edit > Blank Operations > Trim Trailing Space

          Best Regards,

          guy038

          1 Reply Last reply Reply Quote 3
          • Alan KilbornA Offline
            Alan Kilborn @andrecool-68
            last edited by

            @andrecool-68

            With that solution, you’ve give the OP more than they’ve asked for. The better operation, to do only what was required, is this one:

            20cf8388-6583-4e8e-b8ce-e2a6714bbe2d-image.png

            1 Reply Last reply Reply Quote 4
            • CletosC Offline
              Cletos
              last edited by

              Thank you, andrecool-68,

              Works great.

              Hello guy038,

              That option does it very good as well, thank you. Thanks Alan.

              1 Reply Last reply Reply Quote 2

              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