I'm trying to make a email:pass to user:pass converter on python, using regex
Heres is the code:
import re line = tr = open('test.txt', 'r').read() match = re.findall(r'[\w\.-]+@[\w\.-]+' + r':[\w\.-]+', line) f = open('output.txt', 'w') for i in match: i = i.lower() print(" ", i) f.write(i + '\n') f.close()
Output is: [email protected]:password
I need help to remove "@gmail.com" and special characters...