Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Extracting email addresses with regexmatch



  • Please log in to reply
1 reply to this topic
Blaminator
  • Members
  • 15 posts
  • Last active: Sep 25 2015 09:45 PM
  • Joined: 11 Nov 2014

Hi Guys.

 

I just wanted first to thank this great community for the help that I received so far.  I am getting better with this every day.

 

The following line is read from an ini file and then passed to Outlook for creating an email and it works just fine.

[email protected];[email protected];[email protected]&subject=!&[email protected];[email protected]&[email protected]

What I need to do now is break this down into variables without re-writing this huge ini file.

 

I have tried using regexmatch but I am just not yet understanding the syntax.

 

What I need these variables extracted from this line.

 

mailto should equal [email protected];[email protected];[email protected]

CC should equal [email protected];[email protected]

bcc should equal [email protected]

 

I imagine this would be simple for the advanced AHK programmers out there.

 

Any help would be greatly appreciated!



flyingDman
  • Spam Officer
  • 2186 posts
  • Last active: Nov 07 2015 08:15 AM
  • Joined: 27 Feb 2009
✓  Best Answer

Try something like:

text = [email protected];[email protected];[email protected]&subject=!&[email protected];[email protected]&[email protected]
regexmatch(text, "i)(.*)&subject=!&cc=(.*)&bcc=(.*)",match)
msgbox % mailto := match1 "`n" CC := match2 "`n" bcc := match3


Marine Corps Gen. Joseph Dunford told senators at his Joint Chiefs of Staff confirmation hearing : “If you want to talk about a nation that could pose an existential threat to the United States, I'd have to point to Russia. And if you look at their behavior, it's nothing short of alarming.”