• Login
Community
  • Login

i want to remove multiple spaces only between the numbers and replace it with :

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
5 Posts 2 Posters 1.2k 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.
  • G
    GOoOl Channel
    last edited by Oct 16, 2019, 2:36 PM

    67b4530f-57da-4b5c-bd0c-ef575cbd7ad6-image.png

    1 Reply Last reply Reply Quote -1
    • P
      PeterJones
      last edited by Oct 16, 2019, 2:44 PM

      Yes, you asked that yesterday, and I answered. If you have questions about my answer, reply there. Please keep the discussion in that topic rather than starting a new topic.

      1 Reply Last reply Reply Quote 0
      • G
        GOoOl Channel
        last edited by Oct 16, 2019, 3:39 PM

        sorry about that but i want only to search for spaces between the number not behind the number and replace it with :

        P 1 Reply Last reply Oct 16, 2019, 4:06 PM Reply Quote 0
        • P
          PeterJones @GOoOl Channel
          last edited by Oct 16, 2019, 4:06 PM

          @GOoOl-Channel said in i want to remove multiple spaces only between the numbers and replace it with ::

          sorry about that but i want only to search for spaces between the number not behind the number and replace it with :

          You seemed to not understand my statement,

          Please keep the discussion in that topic

          But at this point, since we don’t have the active admin around anymore to help with moving your reply to the other thread, we might as well just continue here.

          I assume you don’t want to use \h+ => : because you only want spaces between the IP and the port to match. That’s reasonable, though your example data doesn’t show that as a requirement.

          Depending on how strict you want to be, the regex will change. You will need to study the documentation I linked to in the other thread to fully understand, and to be able to customize.

          I am going to give you one last freebie; after that, if the answer doesn’t satisfy your needs, you will have to show a willingness to listen, to understand, to read the docs, and to try things. If you do all that, and it doesn’t work, show us what you tried, why you though it would work, and in what way it failed to do what you intended. Use the </> button to mark example text as “code”, so that the forum will not mangle your data. Giving data as pictures is rude to those who you are asking for help, because we then have to retype data to verify our solutions. Also, giving examples of data that should change and data that shouldn’t change will help, because it will then clarify what the actual needs are.

          between the number

          You cannot be between just one thing. I am going to assume you mean “only spaces that have numbers on both sides”. That can be translated into regex syntax reasonably easily:

          • mode = regular expression
          • find = (?<=\d)\h+(?=\d)
          • replace = :
          111.222.333.444 12345 text
          111.222.333.444 12345 blah
          111.222.333.444 12345
          111.222.333.444 12345 text
          

          becomes

          111.222.333.444:12345 text
          111.222.333.444:12345 blah
          111.222.333.444:12345
          111.222.333.444:12345 text
          
          1 Reply Last reply Reply Quote 3
          • G
            GOoOl Channel
            last edited by Oct 16, 2019, 8:53 PM

            ok thnx bro for the help i appreciate it and it works for me now
            and i will take a look to the documents you send me

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