title: Matching exactly one occurrence in a string with a regular expression
body: <p>The other day I sat with a regular expression problem. Eventually I solved it a different way, without regular expressions, but I would still like to know how you do it :)</p>
  
  <p>The problem I was having was running svn update via an automated script, and I wanted to detect conflicts. Doing this with or without regex is trivial, but it got me thinking about a more obscure problem: How do you match exactly ONE occurrence of a character inside a fixed length field of whitespace?</p>
  
  <p>For instance, let's say we wanted to match "C" inside a six-byte wide field:</p>
  
  <pre>
  "C     " MATCH
  "   C  " MATCH
  " C C  " NO MATCH
  "  M   " NO MATCH
  "      " NO MATCH
  "C      " NO MATCH (7 characters, not 6)
  "   C " NO MATCH (5 characters, not 6)
  </pre>