【问题标题】:How to move ip adresses to the end of line in Notepad++ [closed]如何在记事本++中将IP地址移动到行尾[关闭]
【发布时间】:2018-11-16 07:34:19
【问题描述】:

我在txt中有如下数据:

136.40.226.97|ubnt|ubnt|
138.197.81.94|listd|54e172662|
138.68.254.243|wordpress|wordpress|
139.162.55.12|public|public|
139.60.58.136|system|OkwKcECs8qJP2Z|

我想把它转换成这个:

|ubnt|ubnt|136.40.226.97
|listd|54e172662|138.197.81.94
|wordpress|wordpress|138.68.254.243
|public|public|139.162.55.12
|system|OkwKcECs8qJP2Z|139.60.58.136

【问题讨论】:

    标签: regex notepad++ txtextcontrol


    【解决方案1】:

    查找和替换窗口中Ctrl+H搜索模式改为正则表达式 em> 并设置:

    查找内容: (\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})(.*)
    替换为: (\2)(\1)

    这将找到太多组:IP(1),其余行(2),然后 Replace 以相反的顺序写入它们。

    【讨论】:

      猜你喜欢
      • 2013-02-01
      • 2022-11-25
      • 2016-09-20
      • 2015-06-22
      • 2014-06-09
      • 2016-01-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多