Refactored a bit
Tiny change
Regex VM finished but untested.