Advertisement
Guest User

Untitled

a guest
Oct 17th, 2018
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. #przeklenstwa
  2. import re
  3. with open(r"D:\Dokumenty\programowanie\python\pjn\Zajecia2\\tekst.txt","r+") as file_in:
  4. content = file_in.read()
  5. przeklenstwa = re.sub("([a-zA-Z]*)((kur(w|ew))+|(jeb(a|i|c|n|l))+|(sukin)+|(pie(rd|prz))+|(kuta(s|f))+|(pi(z|ΕΊ)d)+|(huj)+|(dup(a|e|y))+|(rucha)+|(cip)+|(dziwk))([a-zA-Z]*)","---",content)
  6. file_in.seek(0)
  7. file_in.write(przeklenstwa)
  8. file_in.truncate()
  9.  
  10. #mail
  11. import re
  12.  
  13. with open(r"D:\Dokumenty\programowanie\python\pjn\Zajecia2\\maile.txt","r+",encoding="utf8") as file_in:
  14. content = file_in.read()
  15. maile = re.findall("[a-zA-Z0-9\._-]+@[-a-zA-Z0-9\.]+", content)
  16. del maile[::2]
  17. print(maile)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement