Advertisement
Guest User

Untitled

a guest
Jul 21st, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. import re
  2.  
  3. def Main(strArq):
  4. regex = re.compile('& (?! amp; | lt; | gt;)')
  5.  
  6. with open(strArq, 'r', encoding="utf-8") as f:
  7. content = f.read()
  8.  
  9. with open (strArq, 'w', encoding="utf-8") as f:
  10. f.write(regex.sub('& ', content))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement