Last active
April 23, 2023 08:19
-
-
Save JoeGlines/a1fa40920b35d773b5489f05d87b7af4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;******************************************************* | |
| ; Want a clear path for learning AutoHotkey; Take a look at our AutoHotkey Udemy courses. They're structured in a way to make learning AHK EASY | |
| ; Right now you can get a coupon code here: https://the-Automator.com/Learn | |
| ;******************************************************* | |
| Haystack = | |
| ( | |
| hello tom12@run.com more text | |
| worked and joe.glines@gmail.com | |
| did too and Joeshmoe@ai.com | |
| this also works joes@school.edu | |
| 432 432 Joe@marketin.cn 43432 | |
| ) | |
| ;Send ^c ;uncomment to use in any program | |
| ;Haystack:=Clipboard ;uncomment to use in any program | |
| Pos:=1 ;set starting position | |
| loop, { | |
| Pos_Found:=RegExMatch(Haystack,"i)(?:[\w_\.-]+)@(?:[\w\.-]+)\.(?:[a-z\.]{2,6})",mail,Pos) | |
| Pos:=Pos_Found+StrLen(mail)+1 ;move location to new position + mail lenght+ 1 | |
| IfEqual,mail,,break ;Break loop if no mail found | |
| mails.=mail "`n" | |
| } | |
| MsgBox % mails |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment