Notepad++: Mark Column until End of File

后端 未结 3 1328
没有蜡笔的小新
没有蜡笔的小新 2021-01-24 22:40

It\'s a simple question, I searched in google but didn\'t find anything helpful.

I know about the column mode in Notepad++ (Alt + Left mouse click or by using

3条回答
  •  南方客
    南方客 (楼主)
    2021-01-24 22:56

    • Ctrl+H
    • Find what: ^\d+\h+(\d+).+$
    • Replace with: $1
    • check Wrap around
    • check Regular expression
    • DO NOT CHECK . matches newline
    • Replace all

    Explanation:

    ^       : begining of line
      \d+   : 1 or more digits
      \h+   : 1 or more horizontal spaces
      (\d+) : group 1, 1 or more digits
      .+    : 1 or more any character
    $       : end of line
    

    Replacement:

    $1      : content of group 1 (ie the second column)
    

    Result for given example:

    2942843527
    2942843813
    2942844067
    2942844321
    2942844575
    2942844837
    2942845100
    2942845345
    2942845599
    2942845845
    

提交回复
热议问题