Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

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

    Help wanted · · · – – – · · ·
    4
    5
    286
    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.
    • Cletos
      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-68 1 Reply Last reply Reply Quote 0
      • andrecool-68
        andrecool-68 @Cletos last edited by

        Imgur

        Alan Kilborn 1 Reply Last reply Reply Quote 3
        • guy038
          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 Kilborn
            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
            • Cletos
              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
              • First post
                Last post
              Copyright © 2014 NodeBB Forums | Contributors