Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #przeklenstwa
- import re
- with open(r"D:\Dokumenty\programowanie\python\pjn\Zajecia2\\tekst.txt","r+") as file_in:
- content = file_in.read()
- 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)
- file_in.seek(0)
- file_in.write(przeklenstwa)
- file_in.truncate()
- #mail
- import re
- with open(r"D:\Dokumenty\programowanie\python\pjn\Zajecia2\\maile.txt","r+",encoding="utf8") as file_in:
- content = file_in.read()
- maile = re.findall("[a-zA-Z0-9\._-]+@[-a-zA-Z0-9\.]+", content)
- del maile[::2]
- print(maile)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement