title: php regex find a string that's NOT of a certain length
body: <p>I'm trying to use preg_match_all to check for syntax errors with comma, where "hello, there" is ok but not "hello,there". </p>
  
  <p>First I realize that a space, double quote, and line break are all acceptable after a comma, so I believe I can do 
  <code>preg_match_all("/(,[^ \r\n\"])/", $mystring, $result);</code>
  and anything returning means there's a syntax error.</p>
  
  <p>Then I realize commas also appear in numbers, eg. 1,234,567, so I need to allow 3-digit numbers in my regex. If I'm purely searching for a 3-digit number, I know I can do
      <code>preg_match_all("/(\d{3})/", $mystring, $result);</code></p>
  
  <p>But in this case I want to <em>exclude</em> 3-digit numbers, ie. the regex should say "match all that have a comma followed by something NOT space, NOT line break, and <em>NOT a 3-digit number</em>". The "and NOT a 3-digit number" part threw me off; I thought I could just do 
      <code>preg_match_all("/(,[^ \r\n\"\d{3}])/", $mystring, $result);</code> but that doesn't seem to be it. What did I do wrong here? And is there a simpler way to accomplish this search?</p>