title: Regular expression skips values if no match
body: <p>I am using the following regular expression to extract data from a file, which works fine as long as the data Am extracting contains all 3 elements of the regex, if not ( if only one is messing ) the regex just skips the data, how do I change this behavior to not skip a value if it does not match but instead fill it with 0 or null?</p>
  <pre><code>bC_NUMBER = 1
  bS_ID = 1
  bTRANSACTION_AMOUNT = 1
  rC_NUMBER = r&quot;number:\s(\d+\*+\d+).*?&quot;
  rS_ID = r&quot;ID:\s*(\d*).*?&quot;
  rT_ID = r&quot;ATM:\s(\w+).*?&quot;
  rT_AMOUNT = r&quot;Total cash dispensed:\s*([a-zA-Z0-9]+)\s+([a-zA-Z0-9]+).*?&quot;
  
  regex = rC_NUMBER*bC_NUMBER+ rS_ID*bS_ID + rT_AMOUNT*bTRANSACTION_AMOUNT
  </code></pre>
  <p>Example Output :</p>
  <pre><code>[('99280*********8823', '182', '40000', 'MGA'), ('99280*********8823', '182', '40000', 'MGA')]
  </code></pre>
  <p>Desired Output :</p>
  <pre><code>[('99280*********8823', '182', '40000', 'MGA'),('6700*********8823', '177', 'null or 0', 'null or 0'), ('99280*********8823', '182', '40000', 'MGA')]
  </code></pre>