Advertisement
Guest User

Untitled

a guest
Jan 28th, 2015
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.52 KB | None | 0 0
  1. # data = "test <TEXT>HI THERE</TEXT> hwfgf <TEXT> DID YOU KNOW THIS IS A TEST</TEXT> <TEXT>!</TEXT>"
  2.  
  3. # output = ""
  4. # regexp = re.compile("<TEXT>(.*?)</TEXT>", re.S)
  5. # for occurrance in regexp.finditer(data):
  6. #   output += occurrance.group(1)
  7.  
  8. # output = "<TEXT>" + output + "</text>"
  9. # print(output)
  10.  
  11.  
  12. fixeddocuments = []
  13. for individualdocument in seperateddocuments:
  14.     regexp = re.compile("<TEXT>(.*?)</TEXT>", re.S)
  15.     for occurrance in regexp.finditer(individualdocument):
  16.         individualdocument += occurrance.group(1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement