Move word with notpad++
-
I have this :
:10001 80.241.223.31
:5500 89.44.113.207
:5555 164.142.44.189
:5500 80.241.154.87
:20000 142.227.138.30
:7777 5.240.23.28
:7777 78.41.71.186
:5500 38.242.243.181i want to get Ip:port
like this :80.241.223.31:10001
89.44.113.207:5500
164.142.44.189:5555
80.241.154.87:5500
142.227.138.30:20000
5.240.23.28:7777
78.41.71.186:7777
38.242.243.181:5500 -
@faouzi-sat said in Move word with notpad++:
i want to get Ip:port
like this :So what have you tried? It is a fairly easy one to solve using regular expression and should be one that even someone who has had little experience, to be able to solve.
Terry
-
But maybe really difficult for someone with absolutely no exposure to regular expressions?
-
Here’s your freebie, since this was your first post. And I appreciate that you showed before-and-after data, even if you neglected the
</>
button to mark your text as plaintext. But as Terry was encouraging you, you will get better help (and learn more) if you put in more effort when asking for help.So, in Regular Expression search mode,
:
matches a literal colon\d+
matches one or more digits\.
matches a literal dot/period/fullstop character- putting
()
parentheses around an expression will save it in the next capture group number
And in the replacement,
$1
references the first capture group number.Putting that all together: put a colon and one or more digits in group#1 and the sequence of digits-dot-digits-dot-digits-dot-digits in group#2, and replace with group2-then-group1
- FIND =
(:\d+) (\d+\.\d+\.\d+\.\d+)
- REPLACE =
$2$1
----
Useful References
-
@PeterJones said in Move word with notpad++:
Here’s your freebie, since this was your first post. And I appreciate that you showed before-and-after data, even if you neglected the
</>
button to mark your text as plaintext. But as Terry was encouraging you, you will get better help (and learn more) if you put in more effort when asking for help.So, in Regular Expression search mode,
:
matches a literal colon\d+
matches one or more digits\.
matches a literal dot/period/fullstop character- putting
()
parentheses around an expression will save it in the next capture group number
And in the replacement,
$1
references the first capture group number.Putting that all together: put a colon and one or more digits in group#1 and the sequence of digits-dot-digits-dot-digits-dot-digits in group#2, and replace with group2-then-group1
- FIND =
(:\d+) (\d+\.\d+\.\d+\.\d+)
- REPLACE =
$2$1
----
Useful References
Working !
thanks