Moved Ptr class into its own file. Implemented the  function. It returns the correct value for a simple regular expression