Select and Delete entire column in notepad++

守給你的承諾、 提交于 2021-01-27 06:54:12

问题


Is there any way to select and delete entire column in notepad++?

Assume that there is a log like that in notepad++:

Dec 14 14:49:34 :
Dec 14 14:49:35 :
Dec 14 14:49:36 :
Dec 14 14:49:37 :

I want to select and delete Just Dec in sample log above. All other columns are wanted!


回答1:


Notepad++ column mode can be driven from the keyboard. Position the cursor at one corner of the wanted area. Press and hold down the Alt and Shift keys. While holding down the Alt and Shift keys use the arrow keys and the Page-up and Page-down keys to extend the selected rectangular area. Can also use the Home and End keys to extend the area left-right to the beginning or end of the current line.

For this question position the cursor before the "Dec" on the first line of the file. Then, while holding down the Alt and Shift keys, press the right-arrow three times and the Page-down several times until reaching the bottom of the wanted area.




回答2:


  • Ctrl+H
  • Find what: ^Dec
  • Replace with: LEAVE EMPTY
  • CHECK Match case
  • CHECK Wrap around
  • CHECK Regular expression
  • Replace all

Explanation:

^           # beginning of line
  Dec       # literally Dec followed by a space

Screen capture (before):

Screen capture (after):



来源:https://stackoverflow.com/questions/59369054/select-and-delete-entire-column-in-notepad

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!