Each regular expression is associated with a production rule in the lexical grammar of the programming language that evaluates the lexemes matching the regular expression.
Each character in a regular expression is either understood to be a metacharacter with its special meaning, or a regular character with its literal meaning.
The script is a grep-like utility, expecting three command-line arguments: a base directory, a filename extension, and a (perl-compatible) regular expression.
A logic with infinitely many modalities is (propositional) dynamic logic, introduced in 1976 and having a separate modal operator for every regular expression.