One of the things that RPG isn’t particularly good at is string scanning & manipulation.
Many other programming languages support using Regular Expressions (or regex, as they are often referred to). Java, PHP, Node.JS, Python, & Perl have support for regex’s built in.
Regular expressions are a very powerful tools for parsing, analyzing, and manipulating text. It should be noted, however, that with such power also comes the possibility for complexity. Some regular expressions can get VERY VERY complex. See the end of this post for a VERY complex expression.
A true regex master can create a functioning expression that is indistinguishable from modem line noise.– Unknown (maybe me)