Super interesting! My first reaction is, doesn't the while loop, combined with the conditional predicate of the string comparison, essentially promote the regular expression (finite state automaton) into a context-free expression (pushdown automaton)?
Definitely reminds me a lot of not needing parentheses on an RPN calculator, and the isomorphism between Lisp expressions and Forth expressions.