Removed regex matching. Was too complicated to use and error prone.