Notepad++, How to remove all non ascii characters with regex?

i searched a lot but no where its written how to remove non ASCII characters from notepad+??

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

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

  • if the file is quite large and cant select all the ASCII lines and just want to select the lines containing non ASCII characters..


  • This expression will search for non-ascii values:

    [^x00-x7F]+
    

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

    Source: Regex any ascii character


    In Notepad++, if you go to:

    Search | Find characters in range | Non-ASCII Characters (128-255)

    you can then step through the document to each non-ascii character.


    To remove all non-ASCII characters, you can use following replacement: [^x00-x7F]+

    删除非ASCII

    To highlight characters, I recommend using the Mark function in the search window: this highlights non-ASCII characters and put a bookmark in the lines containing one of them

    Highligh非ASCII

    If you want to highlight and put a bookmark on the ASCII characters instead, you can use the regex [x00-x7F] to do so.

    Cheers

    链接地址: http://www.djcxy.com/p/69576.html

    上一篇: 有可能在PHP中引用匿名数组的特定元素吗?

    下一篇: Notepad ++,如何用正则表达式去除所有非ascii字符?