Add process function to process RegEx

The process function works with Epsilon, One, Union, and Cat.
Star will be added later.