queryEmail.bat
if not DEFINED IS_MINIMIZED set IS_MINIMIZED=1 && start "" /min "%~dpnx0" %* && exit
SET PATH=C:\Program Files\AnsysEM\AnsysEM20.2\Win64\common\IronPython\
ipy64 queryEmail.py
queryEmail.py
# coding=UTF-8
import re
import clr
clr.AddReference('System.Windows.Forms')
from System.Windows.Forms import Clipboard, MessageBox
input = Clipboard.GetText()
emails = set([i.lower() for i in re.findall('[\w\.\-]+@[\w\.]+', input)])
try:
result = '; '.join(emails)
Clipboard.SetText(result)
MessageBox.Show("{} 郵件地址到剪貼簿!".format(len(emails)))
except:
MessageBox.Show("找不到郵件地址!")
沒有留言:
張貼留言