I just wrote an answer to this regex question, which was trying to find numeric strings with or without commas (e.g. 1,234,567.89
). I wanted to be thorough because I've seen this problem a lot, both on SO and in real-world code.
When I finished, I found 7 other new answers waiting for me, mostly variations on each other. Which would be fine, except for one thing: They're garbage answers. Unless I'm severely mistaken, every answer but mine (so far) is deeply flawed, and I want to downvote all of them. Yeah, I'm a stickler on regex, but IMHO if your pattern lets stuff like ...,.,,.,,..9
or even ...
pass as "numeric input," then you've failed to meet even the bare minimum requirements.
Enough venting. The reason I'm whining to Meta about this is that I'm about to do something that'll REALLY look like tactical downvoting, and I'm mildly concerned about the consequences. If I answer a question and then rain downvotes on every competing answer, will I get flagged for abuse? That would certainly seem like suspicious behavior to me.
More of an opinion question: At what point does a semi-correct answer deserve a downvote? Obviously, if it were just a typo, I'd edit it myself. Where's the line between "close enough" and "this answer sucks?"
Basically, is it just me? You've seen the question; am I right that these answers deserve downvotes? Seven people thought that [0-9,.]+
was good enough to declare something a number, so why am I the only one who doesn't?
Note: I found some related questions, but nothing that seemed like a duplicate:
- What's the etiquette on downvoting every wrong answer to a given question? - More of an etiquette question, plus the voter hadn't posted his own answer.
- Does an answer that ignores major details in a question deserve a downvote? - I guess this pretty much covers my second question.
Also, as some have noted, my answer ended up pretty long and thorough. I put in a lot of effort because, with all this talk about how the other answers sucked, I wanted to be extra sure mine didn't. I don't expect pages of detail in a normal SO answer.
[0-9.,]+
is nowhere near good enough.[0-9.,]+
.[0-9.,]+
wasn't a solution. :-)