How To Find Non-ASCII Characters in Vi

To search for non-ASCII characters:
/[^\d0-\d127]
Use the substitute function to clean them up:
:%s/[^\d0-\d127]/ /g
To search for non-ASCII characters:
/[^\d0-\d127]
Use the substitute function to clean them up:
:%s/[^\d0-\d127]/ /g
Categories: How-To's, Technology Tags: ASCII, Char, Characters, Find, howto, Replace, search, tips, vi, vim
Copyright © 2005-2025 Eric Michael Stone | Random Thoughts, Whims and Fancies…. Powered by WordPress
Leave Your Comment
All fields marked with "*" are required.