Regular expression engine written in C#