One Minute One-liners for the curious: https://www.youtube.com/@1minute1liners
In this YouTube short from One Minute One-liners for the curious(@1minute1liner), I explain how to use character classes as an easy way to filter text using GREP. We built a PARI function that extracts characters in a string by character class: extract(str,class,{not=0}). We also built an Octave function as well.
You can test with the following two line examples.
GP/PARI:
strout=strchr(Vecsmall([1..127]));
a=extract(strout,"alnum"); #a
Octave:
strout=char([1:127]);
a=extract(strout,"alnum");length(a)
You can write out a file containing all 128 7 bit ascii characters in a chars file for testing. Here is jab.txt as well.