Community

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

    join 2 txt with alignment

    General Discussion
    6
    15
    124
    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.
    • cisco779k
      cisco779k last edited by

      hi to everybody.
      i have 2 txt with the same number of lines. I need a txt that has the 2 values of the 2 txts aligned on the same line, as in example here:

      file 01

      aaaa
      bbbb
      cccc
      

      file 02

      :0069
      :1haks
      :aneyd
      

      file result

      aaaa:0069
      bbbb:1haks
      cccc:aneyd
      
      astrosofista 1 Reply Last reply Reply Quote 0
      • L
        litos81 last edited by

        Hi @cisco779k ,
        you can use ‘Column Mode’ (https://npp-user-manual.org/docs/editing/#column-mode-column-editor) for that task.
        Assuming your files have more lines than just 3…:
        Place your cursor the cursor on the top left corner of your selection (in this case to the left of :0069). Then scroll down to the very bottom of the file and press Alt + Shift + click to the right of the last piece of text you want to copy (in this case to the right of :aneyd). Finally, you just have to go back to your first file, place your cursor wherever you need (in this case to the right of aaaa) and simply paste (Ctrl + V) your selection.

        Hope it helps.

        1 Reply Last reply Reply Quote 2
        • cisco779k
          cisco779k last edited by

          yes, work. thank you.
          but when paste from clipboard i have some blank space, ex

          mhmd0    :mmmm1234
          jm4050   :kenari4050
          WeakWifeM:Durak123essenger
          wigglypuf:burakburcu12
          Dixtra   :2343a2343
          

          i need this:

          mhmd0:mmmm1234
          jm4050:kenari4050
          WeakWifeM:Durak123essenger
          wigglypuf:burakburcu12
          Dixtra:2343a2343
          

          how to remove this blank space?

          1 Reply Last reply Reply Quote 0
          • cisco779k
            cisco779k last edited by

            my txt it is more than 1000 rows…
            if i have to fix all the lines i don’t finish anymore!

            1 Reply Last reply Reply Quote 0
            • astrosofista
              astrosofista @cisco779k last edited by

              @cisco779k, @litos81

              Recently reposted some animated gifs that illustrate and explain how to deal with multiselections. These are the links, the first one is your best bet

              https://community.notepad-plus-plus.org/post/53667
              https://community.notepad-plus-plus.org/post/54925
              https://community.notepad-plus-plus.org/post/51906
              https://community.notepad-plus-plus.org/post/53168 (explanation)
              https://community.notepad-plus-plus.org/post/51915
              https://community.notepad-plus-plus.org/post/51786

              Take care and have fun!

              1 Reply Last reply Reply Quote 1
              • guy038
                guy038 last edited by guy038

                Hello, @cisco779k and All,

                Oh, quite easy !

                SEARCH \x20+(?=:)

                REPLACE Leave EMPTY

                The look-around (?=:) is not needed, presently, but could be in case of other ranges of space characters in lines

                Best Regards,

                guy038

                Alan Kilborn 1 Reply Last reply Reply Quote 0
                • Alan Kilborn
                  Alan Kilborn @guy038 last edited by

                  From the data, I suspect we might be unwittingly giving aid to someone that is up to nefarious purposes with usernames and passwords again…

                  1 Reply Last reply Reply Quote 2
                  • guy038
                    guy038 last edited by guy038

                    Hi, @alan-kilborn and All,

                    You are absolutely right, Alan, on this point. Also, it’s up to @cisco779k to show us, in what way, these text manipulations are useful for his work-flow and not malevolent !

                    BR

                    guy038

                    1 Reply Last reply Reply Quote 0
                    • cisco779k
                      cisco779k last edited by

                      first thank you astrosofista for your reply. very usefull.
                      thank you also guy038 for your reply. good.

                      at the end to Alan Kilborn and guy038: i don’t really understand what you’re referring to… i don’t think any of us who write here should justify the purpose of his request… it’s a personal file of mine that i want to edit a certain way. i really don’t understand these subtle insinuations against me all the time.
                      I don’t think you ever ask anyone what to do with his files…

                      1 Reply Last reply Reply Quote 1
                      • Terry R
                        Terry R last edited by Terry R

                        @guy038 said in join 2 txt with alignment:

                        Hi, @alan-kilborn and All,
                        You are absolutely right, Alan, on this point.

                        @guy038 , @Alan-Kilborn I’m sorry but I’m with @cisco779k on this one. Whilst the data might well look suspect, we have no right to ascertain the legitimacy of such data (nor what the purpose is).

                        I consider ourselves to be doctors if such an analogy can be made. Does a doctor ask the patient if the gunshot wound was received during an illegal activity before attending to their needs, and trying to save a life if required, no!

                        We can only hope that none of the solutions will be used for illegal purposes, but as soon as we place them in the public domain, anyone can (even at a later stage) usurp the solution and possibly use it for needs other than what we intended when supplying it.

                        Just consider the atom bomb. The original intent of scientists working on fission was that they perceived a use as an energy source, since it was a lot more dense that other chemicals of the time. It took someone else after the fact to realise the potential as bombs.

                        Terry

                        Alan Kilborn 1 Reply Last reply Reply Quote 2
                        • Alan Kilborn
                          Alan Kilborn @Terry R last edited by

                          @Terry-R

                          But unlike a doctor, who is morally compelled to help a dying gunshot victim; here a reply is optional.
                          I could have helped the OP, but I chose not to.

                          Perhaps I should have not posted discouraging others.
                          But maybe it was my way of potentially bettering the world, which perhaps I am morally obligated to do? :-)

                          1 Reply Last reply Reply Quote 0
                          • Terry R
                            Terry R last edited by

                            @Alan-Kilborn said in join 2 txt with alignment:

                            here a reply is optional.

                            Agreed, and I was tempted to include that statement myself. We can either elect to help if we feel compelled to do so, or stand back and not help. But to first help, and then be condescending towards the OP is a bit picky in my opinion.

                            my 2c worth.

                            Terry

                            PS I do value your input, except on this occasion I happen to disagree with it strongly enough to voice my opinions. I will stress, they are MY opinions, just as your statements were yours.

                            Alan Kilborn 1 Reply Last reply Reply Quote 0
                            • guy038
                              guy038 last edited by

                              Hi, @cisco779k, @alan-kilborn, @terry-r and All,

                              Like all of you, I do not want to spend my time finding a solution for a dubious use of certain files !

                              But, maybe, I was a bit too “intrusive” and should not have, as a matter of principle, presupposed a dishonest use ?

                              Rest assured, @cisco779k, that, at no time, did I want to know the nature of your data !

                              BR

                              guy038

                              1 Reply Last reply Reply Quote 1
                              • Alan Kilborn
                                Alan Kilborn @Terry R last edited by

                                @Terry-R said in join 2 txt with alignment:

                                condescending towards the OP

                                Hmm, I don’t see my original statement, including an emphasized “might be…”, as that way. But take it as you will.

                                1 Reply Last reply Reply Quote 0
                                • cisco779k
                                  cisco779k last edited by

                                  how many useless controversies, as usual. I don’t really understand what’s suspicious about my request… I repeat it is a personal file of mine, and it is nothing so evil as it has been painted by those who have started this whole discussion. I really do not understand this totally inappropriate reaction.
                                  and perhaps only thing, you are right to say that here many ask for help while perhaps the real intent of this forum is to talk about the notepa++ program, but it is also true that many other users here ask how to solve their problems with reg-ex and other solutions, I am not the only one asking for help on this.
                                  Having said that then it is up to you to help or not, responding or not to the various posts. but having said this all the other controversies about a potentially legal file or not i find them really superfluous and useless, as already said a time ago …

                                  1 Reply Last reply Reply Quote 1
                                  • First post
                                    Last post
                                  Copyright © 2014 NodeBB Forums | Contributors