Limit a plural string result to only items with ASCII characters

I have some relevance that returns a plural string result, but I want to remove any results that have odd characters that won’t work for me further down the chain.

This is the raw relevance:

unique values of (it as string as trimmed string) of values "DisplayName" of keys whose(exists values whose(it as string as lowercase contains "msiexec") of it) of keys "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" of (x64 registries; x32 registries)

It would be nice to parse out some of the more common odd characters like this: https://bigfix.me/relevance/details/3009843

But as a failsafe, I’d like to just remove results entirely that aren’t going to work well.

I think I’ll need to come up with some sort of regex to handle this.

Related:

Well, this seems like an option: unique values whose(not exists characters whose(it as hexadecimal > "7f") of it) of

unique values whose(not exists characters whose(it as hexadecimal > "7f") of it) of (it as string as trimmed string) of values "DisplayName" of keys whose(exists values whose(it as string as lowercase contains "msiexec") of it) of keys "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" of (x64 registries; x32 registries)
1 Like