import re # 載入正規表達式

with open("test.txt", 'r') as f:
    lines = f.read()

relus = re.compile(r"[a-zA-Z0-9_.+-]+@[a-zA-Z]+\.edu+\.tw")
emails = relus.findall(lines)
print(emails)
86347afb0b81b6c5ae0381730898f59636734dc9
<mask token>

<mask token>
with open('test.txt', 'r') as f:
    lines = f.read()
<mask token>
print(emails)

<mask token>
with open('test.txt', 'r') as f:
    lines = f.read()
relus = re.compile('[a-zA-Z0-9_.+-]+@[a-zA-Z]+\\.edu+\\.tw')
emails = relus.findall(lines)
print(emails)

import re
with open('test.txt', 'r') as f:
    lines = f.read()
relus = re.compile('[a-zA-Z0-9_.+-]+@[a-zA-Z]+\\.edu+\\.tw')
emails = relus.findall(lines)
print(emails)

import re # 載入正規表達式

with open("test.txt", 'r') as f:
    lines = f.read()

relus = re.compile(r"[a-zA-Z0-9_.+-]+@[a-zA-Z]+\.edu+\.tw")
emails = relus.findall(lines)
print(emails)