Autohotkey 自动热键;在文件中搜索字符串。伪码

Autohotkey 自动热键;在文件中搜索字符串。伪码,autohotkey,Autohotkey,我有这样一个文件(10000行): 我想做的是,当找到与7个字符的用户名匹配时,从每行的第二部分提取电子邮件 这是我当前的伪代码。我真的不知道如何从文本文件中提取电子邮件。我尝试使用loopread,但它不起作用 Userid: Gui, Submit, NoHide { If (strlen(tuserid) = 7) { Search %textfile% for tuserid If finds tuserid { Take the

我有这样一个文件(10000行):

我想做的是,当找到与7个字符的用户名匹配时,从每行的第二部分提取电子邮件

这是我当前的伪代码。我真的不知道如何从文本文件中提取电子邮件。我尝试使用loopread,但它不起作用

Userid:
Gui, Submit, NoHide
{
If (strlen(tuserid) = 7)
{
Search %textfile% for tuserid
    If finds tuserid
            {
            Take the email from the same line and copy to %emailvariable%
            Guicontrol,, Email, %emailvariable%
            }

一个文件内容循环和一些正则表达式将完成此任务。:)


谢谢也许我误解了,但你是说它可以像这样实现吗?我试过了,但没有成功。
Userid:
Gui, Submit, NoHide
{
If (strlen(tuserid) = 7)
{
Search %textfile% for tuserid
    If finds tuserid
            {
            Take the email from the same line and copy to %emailvariable%
            Guicontrol,, Email, %emailvariable%
            }
inputFile = C:\My Data Textfile.txt
outputFile = C:\ExtractedEmails.txt
regex = ".+?","(.+?)"
Loop, read, %inputFile%, %outputFile%
{
    RegexMatch(A_LoopReadLine, regex, match)
    FileAppend, %match1%`r`n
}