Conatins solution of some of the regex problems