Catch errors if regex doesn't match