Open dbordak opened 10 years ago
Regex replace multiple spaces with one?
That was just an example. This is a bit of a broader issue, i.e. you should recognize what kinds of formatting issues come up often and attempt to fix them.
But yeah, I'm sure there's a regex to reduce variable amounts of whitespace into a single space, which is probably what you'd want here.
As it is, some items have incorrectly formatted descriptions. As an example, 'SHRIMP SCAMPI' has two spaces instead of one. While these issues are completely unpredictable due to the origin of these descriptions, attempting to fix them would probably make the API more valuable.