fork download
  1. import re
  2.  
  3. tempFile = (" <Command name=\"somecom\" type=\"type\" >\n"
  4. " <input name=\"some input\" />\n"
  5. " <output name=\"some output\" />\n"
  6. " </Command>\n"
  7. " <?ignore <Command name=\"somecom\" type=\"type\" >\n"
  8. " <input name=\"some input\" />\n"
  9. " <output name=\"some output\" />\n"
  10. " </Command> ?>")
  11. patr = re.compile("(?s)<\?ignore.*?\?>")
  12. tempFile = re.sub(patr,"",tempFile)
  13. print(tempFile)
Success #stdin #stdout 0.02s 27712KB
stdin
Standard input is empty
stdout
 <Command name="somecom" type="type" >
     <input name="some input" />
     <output name="some output" />
  </Command>