One Minute One-liners for the curious: https://www.youtube.com/@1minute1liners
In this YouTube short from One Minute One-liners for the curious(@1minute1liners), I explain how to build string functions producing substrings, indices and binary vectors using grep and sed.
A set of string functions in PARI is given below in string.gp, along with test code in test.gp and a test file jab.txt.