Regular expression engine.