Implementation of a regular expression interpreter, for a subset of the regex syntax