Implemented regex.
Updated the regex, now according to assignment