i want to remove multiple spaces only between the numbers and replace it with :
-
-
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.
-
sorry about that but i want only to search for spaces between the number not behind the number and replace it with :
-
@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
-
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