On Saturday, February 22, 2020 at 2:26:18 PM UTC-8, TJ Luoma wrote:
The solution depends upon the BBEdit class of gremlins you're trying to find.
For the non-ASCII characters class, a "Find All" using the grep pattern:
[^\x00-\x7F]
will find all non-ASCII characters.
For the Null (ASCII 0) characters class, a "Find All" using the grep pattern:
[\x00]
will find all Null (ASCII 0) characters.
For the Control characters class, I'm not certain without more testing what traditional ASCII control characters BBEdit excludes from the Zap Gremlins Control characters class and what the file line endings dependancies might be. With Unix line endings, I know the horizontal tab (\x09) and line feed (\x0A) are excluded from the Zap Gremlins Control characters class. So, assuming exclusion of those two characters, presuming also excluding the special case Null (ASCII 0) character, and including the delete (\x7F) character, a "Find All" using the grep pattern:
[\x01-\x08\x0B-\x1F\x7F]
is a first try for finding BBEdit's Zap Gremlins Control characters class of characters in a file.