Community
    • Login

    Sad Person with an XML file and 500 numbers

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    15 Posts 4 Posters 1.5k Views
    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.
    • jjaggiiJ
      jjaggii @Jim Dailey
      last edited by

      @Jim-Dailey Thanks Jim. I tried your advice with a small sample of six numbers, but instead of inserting one number in each of the 6 rows it inseryed all 6 numbers in each row!

      Alan KilbornA 1 Reply Last reply Reply Quote 1
      • Alan KilbornA
        Alan Kilborn @jjaggii
        last edited by Alan Kilborn

        @jjaggii said:

        instead of inserting one number in each of the 6 rows it inseryed all 6 numbers in each row!

        You likely did something wrong. I tried @dinkumoil 's (you did mean him, right, not Jim?) instructions and it worked perfectly, here’s a portion of the result I obtained:

        <batch><sample number="1 " result="positive"/></batch>
        <batch><sample number="2 " result="positive"/></batch>
        <batch><sample number="3 " result="positive"/></batch>
        <batch><sample number="4 " result="positive"/></batch>
        <batch><sample number="5 " result="positive"/></batch>
        <batch><sample number="6 " result="positive"/></batch>
        <batch><sample number="7 " result="positive"/></batch>
        <batch><sample number="8 " result="positive"/></batch>
        <batch><sample number="9 " result="positive"/></batch>
        <batch><sample number="10" result="positive"/></batch>
        <batch><sample number="11" result="positive"/></batch>
        <batch><sample number="12" result="positive"/></batch>
        

        If I were doing it for real it seems I would need to follow it up with a regex replacement of ("\d+)\s+(?=") with \1…

        jjaggiiJ 1 Reply Last reply Reply Quote 0
        • jjaggiiJ
          jjaggii
          last edited by

          Just discovered that it will only allow one reply every 20 minutes when I was replying directly. I shall therefore reply to all repliers.Firstly, thank you for going to the trouble of replying.

          I first tried Jim’s suggestion. I tried a sample of six rows and attempted to paste 6 numbers, one into each row. However it pasted all 6 numbers into each row.
          I next looked at Alan’s idea. But using the text to insert feels the same as pasting directly into the file. The number to insert does not let me insert my full 10 digit number.

          @dinkumoil My numbers are not consecutive they are random and unique.

          Alan KilbornA 1 Reply Last reply Reply Quote 1
          • Alan KilbornA
            Alan Kilborn @jjaggii
            last edited by Alan Kilborn

            @jjaggii

            it will only allow one reply every 20 minutes

            You shouldn’t have to wait 20 mins between posts any longer.

            my numbers are not consecutive they are random and unique

            So you would use a column block selection (select via shift+alt+arrows) to copy your number list, and then paste that inside the empty double quotes on your first line of 500 duplicates. The 500 numbers in the block should then just appear in the right place on each line.

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

              @Alan-Kilborn No, I meant Jim. @dinkumoil’s suggestion involves inserting consecutive numbers. I didnt try his because my numbers are random 10 digits numbers.

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

                @Alan-Kilborn Thanks Alan. I’ll have to figure out what I did wrong. Because what you are suggesting, as jim did, Is what I thought I had done. I will report back.

                1 Reply Last reply Reply Quote 0
                • Jim DaileyJ
                  Jim Dailey
                  last edited by

                  @jjaggii

                  You need to copy your random numbers using a rectangular copy in notepad++, then paste them where appropriate.

                  If you do a “normal” copy, you won’t get the proper results.

                  Alan KilbornA 1 Reply Last reply Reply Quote 0
                  • Alan KilbornA
                    Alan Kilborn @Jim Dailey
                    last edited by

                    @Jim-Dailey said:

                    need to copy your random numbers using a rectangular copy

                    I said:

                    So you would use a column block selection (select via shift+alt+arrows) to copy your number list

                    How many times are we gonna say this?

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

                      @Alan-Kilborn Until it sunk in! It just did. Thank you everyone for your input and for putting up with the uneducated.

                      1 Reply Last reply Reply Quote 2
                      • Jim DaileyJ
                        Jim Dailey
                        last edited by

                        @jjaggii

                        Glad you figured it out.

                        Uneducated is not a problem and with desire is a temporary condition, unlike pettiness which requires real effort to overcome.

                        Alan KilbornA 1 Reply Last reply Reply Quote 1
                        • Alan KilbornA
                          Alan Kilborn @Jim Dailey
                          last edited by

                          It’s not uneducated nor is it pettiness; it’s simply reading what people take the time to write in responses. If you do that and it still doesn’t work, read it (and try it) again. Of course, sometimes the help is wrong as well, so after a couple of tries and fails it’s probably best to ask. But we’re all about solutions here, and it sounds like you have one, so there we go, another success story. :)

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post
                          The Community of users of the Notepad++ text editor.
                          Powered by NodeBB | Contributors