Regular Expression Matching

My own solution