Rudimentary infix regex engine