Regular Expressions and Finite State Machines