title: Why can't I scoop out some ID's of some strings using regex?
body: <p>I'm trying to scoop out some <code>ID</code>'s from some strings. The portion I would like to grab from each string is between <code>bd-</code> and <code>?</code>. The latter is not always present so I wish to make this sign <strong><em>?</em></strong> optional. I know I can achieve the same using string manipulation but I wish to do the same using regex.</p>
  
  <p>I've tried with:</p>
  
  <pre><code>import re
  
  content = """
  id-HTRY098WE
  id-KNGT371WE?witkl
  id-ZXV555NQE?phnu
  eh-VCBG075LK
  """
  for item in re.findall(r'id-(.*)\??',content):
      print(item)
  </code></pre>
  
  <p>Output it yields:</p>
  
  <pre><code>HTRY098WE
  KNGT371WE?witkl
  ZXV555NQE?phnu
  </code></pre>
  
  <p>Expected output:</p>
  
  <pre><code>HTRY098WE
  KNGT371WE
  ZXV555NQE
  </code></pre>
  
  <p><strong><em>How can I scrape <code>ID</code>'s out of some strings?</em></strong></p>