title: Remove select characters from xml tags using regex
body: <p>I am trying to remove only select characters from xml tags + any digit that follows + the proceeding <code>:</code> .. for example:
  <code>&lt;ns2:projectArea alias=</code> should look like <code>&lt;projectArea alias=</code>
  and <code>&lt;ns9:name&gt;</code> should look like <code>&lt;name&gt;</code></p>
  
  <p>Basically, the digit will be random (anything from 1-9) and there will always be a proceeding <code>:</code> that must be deleted.</p>
  
  <p>What I have so far is:</p>
  
  <pre><code>import argparse
  import re
  
  # Initiates argument
  parser = argparse.ArgumentParser()
  
  parser.add_argument("--input", "-i", help="Set the input xml to clean up")
  parser.add_argument("--output", "-o", help="Set the output xml location")
  
  args = parser.parse_args()
  inputfile = args.input
  outputfile = args.output
  if args.input:
    print("inputfile location is %s" % args.input)
  if args.output:
    print("outputfile location is %s" % args.output)
  # End argument
  
  text = re.sub('&lt;[^&lt;]+&gt;', "", open(inputfile).read())
  with open(outputfile, "w") as f:
      f.write(text)
  </code></pre>
  
  <p>This piece of the code is the issue: <code>'&lt;[^&lt;]+&gt;'</code>
  It deletes entire tags, so if i need to search text later on,  basically have to search plain text rather than by tags.</p>
  
  <p>What can I replace <code>'&lt;[^&lt;]+&gt;'</code> with that will delete <code>ns</code> + the following number (whatever number it may be) + the <code>:</code> that follows it?</p>