Created
May 28, 2021 21:24
-
-
Save JoeGlines/cc40e4806e91242bb288590284d53bc0 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
text= | |
( | |
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. | |
Lorem ipsum [email protected] dolor sit amet, (555)555.8957 the-Automator.com consectetuer adipiscing elit. | |
https://www.linkedin.com/in/joeglines/ @recruiting lorem ipsum | |
dolor sit http://github.com/maestrith/AHK-Studio elit. | |
dolor sit www.github.com/maestrith/AHK-Studio elit. | |
) | |
Pos:=1 ;set starting point | |
Loop, { | |
;Regex Pattern for URLs borrowed from https://stackoverflow.com/questions/3809401/what-is-a-good-regular-expression-to-match-a-url | |
Found_Pos:=RegExMatch(Text,"i)((http|ftp|https):\/\/[\w-]+(\.[\w-]+)+([\w.,@?^=%&:\/~+#-]*[\w@?^=%&\/~+#-])?)",Obj,Pos) | |
Pos:=Found_Pos+(StrLen(obj)+1) ;Set next start position | |
URLs.=obj "`r" ;add to emails variable | |
If not OBJ ;If not found break Loop | |
Break | |
} | |
MsgBox % URLs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment