title: grep: "^." doesn't match correctly
body: <p>Can someone explain why this code doesn't work as expected?
  I would expect it only to match the first character, and it does with literal characters, but the wildcard (.) and characters classes behave strangely:</p>
  
  <p>I use -o just to demonstrate exactly how things are matching, it doesn't change what matches at all.</p>
  
  <pre><code>$ echo foo | grep -o '^.'
  f
  o
  o
  </code></pre>
  
  <p>Some more unexpected behavior:</p>
  
  <pre><code>$ echo foobarbazquux | grep -o '^[foarqux]'
  f
  o
  o
  
  $ echo foobarbazquux | grep -o '^.[^u]'
  fo
  ob
  ar
  ba
  zq
  </code></pre>
  
  <p>Esentially the beginning-of-line matcher (^) is not behaving as expected in these cases. Is there any way to make it behave more normally?</p>