问题
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