Strip additional whitespace off the end of the data as it breaks the regex.