Вы находитесь на странице: 1из 2

HOWTO USE NOTEPAD++ TO DELETE SELECTED ROWS IN A TEXT FILE

I have a text file (it is an SRT subtitle file) like this, where I need to delete the Chinese text lines

1
00:00:02,640 --> 00:00:09,640
WEB-DL 1080p版字幕制作:LxyLab 怨灵X宛若青空

2
00:00:22,640 --> 00:00:25,750
相比之下我更喜欢狗 不过对猫也不该这么狠
I'm more of a dog man myself, but no cat deserves this.

3
00:00:26,940 --> 00:00:29,010
你有跟人提起过你来这里吗
Did you tell anyone about why you were down here?

4
00:00:29,200 --> 00:00:31,070
⻜机上的路人 餐馆里的人
Someone on the plane? Someone you met at a restaurant?

5
00:00:31,070 --> 00:00:32,010
当然没有
'Course not.
Using Notepad++ v.7.5.6 type CTRL+F for the Search window, then click on the “Mark” tab and write
“[\x00-\x7F]” in the Find what field to select the rows that contain un-ASCII characters, Fig. below
This way you will Mark with a BLUE dot the selected rows, see Fig

Remove the BLUE dot where unnecessary

From the Menu, click on Search > Bookmark > Remove Bookmarked Lines will remove un-ASCII lines

Вам также может понравиться