title: python re.sub single or multiple characters
body: <p>I have a lot of strings in the form of </p>
  
  <p><code>100XX</code> <code>123XX</code> <code>1XX</code> <code>234XXXXX</code> and I would like to replace all the <code>X</code> with <code>0</code>'s. There is other text in the string too in the form of an address.</p>
  
  <p><code>234XX N. Somestreet Anytown, USA</code> I can't be sure if numbers followed by X doesn't appear anywhere else so I cannot just replace the X's</p>
  
  <p>I have this code so far but it is only dropping in a single <code>0</code> and I need it to drop in a variable amount of 0's..</p>
  
  <p><code>re.sub(r"([0-9]+)([X]+)", r"\g&lt;1&gt;0", "234XX")</code></p>
  
  <p>which will give me <code>2340</code>...I need it to return <code>23400</code> or if given <code>123XXX</code> I need it to return <code>123000</code></p>