title: Python Regex: Question mark (?) doesn't match in middle of string
body: <p>I bumped into the problem while playing around in Python: when I create a random string, let's say "test 1981", the following Python call returns with an empty string.</p>
  
  <pre><code>&gt;&gt;&gt; re.search('\d?', "test 1981").group()
  ''
  </code></pre>
  
  <p>I was wondering why this is.  I was reading through some other posts, and it seems that it has to do with greedy vs. non-greedy operators.  Is it that the '?' checks to see if the first value is a digit, and if it's not, it takes the easier, quicker path and just outputs nothing?
  Any clarification would help.  Thanks!</p>