Create my own regex matcher using FSMs