toonboon Posted December 19, 2008 Posted December 19, 2008 I have the following code:#include <array.au3> #include <INet.au3> $file = FileRead(@ScriptDir & "/urls.txt") $urls = StringSplit($file, @CRLF, 1) For $a = 1 to $urls[0] $urlsplit = StringSplit($urls[$a], "~") $format = StringSplit($urlsplit[2], "{URL}", 1) $url = $urlsplit[1] $wrapleft = $format[1] $wrapright = $format[2] $source = _INetGetSource($url) MsgBox(0,'',$wrapleft & "(.?*)" & $wrapright) $links = StringRegExp($source, $wrapleft & "(.?*)" & $wrapright, 3) _ArrayDisplay($proxies) NextoÝ÷ Ù©Ý!©°¢w^®)àûayú%"¬¦,¹^jëh×6$links = StringRegExp($source, $wrapleft & "(.?*)" & $wrapright, 3)I have a .txt file in which are urls and in those urls are links. the txt file is in this format:http://www.url1.com~href="{URL}"> http://www.url2.com~value="{URL}" typebecause the wrappings around the urls are different for each website, and I still need to extract the link urls.These urls aren't always a link, so _IEGetLinkCollection() or whatever that function is called won't work.The links are also in a list, so just scanning the entire source for urls won't work either.The main focus is on having a variable in a regular expression, how can I do that? [right]~What can I say, I'm a Simplistic person[/right]
oMBRa Posted December 19, 2008 Posted December 19, 2008 what's your output should be like, I dont understand sorry
Moderators SmOke_N Posted December 19, 2008 Moderators Posted December 19, 2008 There's no difference with a variable or the string as long as you've escaped the proper characters. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now