如何更改记事本++中括号内的字符串顺序?

时间:2019-02-06 13:07:13

标签: notepad++

如何更改此设置

differentlenghttext[anynumber,9E+09,9E+09,9E+09,9E+09,9E+09]

differentlenghttext[9E+09,anynumber,9E+09,9E+09,9E+09,9E+09]

1 个答案:

答案 0 :(得分:1)

  • Ctrl + H
  • 查找内容:\[([^,]+),([^,]+)
  • 替换为:$2,$1
  • 检查环绕
  • 检查正则表达式
  • 全部替换

说明:

\[              # openning square bracket
([^,]+)         # group 1, 1 or more non comma
,               # a comma
([^,]+)         # group 2, 1 or more non comma

enter image description here