如何使用正则表达式和Notepad ++删除所有非ASCII字符? [英] How do I remove all non-ASCII characters with regex and Notepad++?

查看:291
本文介绍了如何使用正则表达式和Notepad ++删除所有非ASCII字符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我进行了很多搜索,但是没有写任何方法如何从Notepad ++中删除非ASCII字符.

I searched a lot, but nowhere is it written how to remove non-ASCII characters from Notepad++.

我需要知道在查找和替换中写什么命令(如果有图片,那会很棒).

I need to know what command to write in find and replace (with picture it would be great).

  • 如果我想加入白名单并为所有ASCII词/行添加书签,以便非ASCII行将被取消标记

  • If I want to make a white-list and bookmark all the ASCII words/lines so non-ASCII lines would be unmarked

如果文件很大并且无法选择所有ASCII行,而只想选择包含非ASCII字符的行...

If the file is quite large and can't select all the ASCII lines and just want to select the lines containing non-ASCII characters...

推荐答案

此表达式将搜索非ASCII值:

This expression will search for non-ASCII values:

[^\x00-\x7F]+

选中搜索模式=正则表达式",然后单击"查找下一个".

Tick off 'Search Mode = Regular expression', and click Find Next.

来源: 对任何ASCII字符进行正则

这篇关于如何使用正则表达式和Notepad ++删除所有非ASCII字符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆