Notepad ++将结束文本移到行的开头

时间:2017-10-01 15:48:55

标签: notepad++

我的一行文字看起来像这样:

Arnold Sweet - A+
Ashley C. D. - B+
Steve Crook Dewl - A-
Tanya A - Absence w/e

以及更多......

我如何制作所有行:

A+ - Arnold Sweet
B+ - Ashley C. D.
A- - Steve Crook Dewl
Absence w/e - Tanya A

TNX

1 个答案:

答案 0 :(得分:2)

  • 控制 + ħ
  • 找到:^(.+?) - (.+?)$
  • 替换为:$2 - $1
  • 检查环绕
  • 检查正则表达式
  • 请勿检查. matches newline
  • 全部替换

<强>解释

^       : begining of line
(.+?)   : group 1, 1 or more any character, not greedy
 -      : literally a space, a dash, a space
(.+?)   : group 2, 1 or more any character, not greedy
$       : end of line