JohnOne Posted June 2, 2010 Share Posted June 2, 2010 (edited) Im looking for a handout here My brains simply go blank when trying to formulate any sort of pattern, so if you are feeling generous and have the time....?Heres my string, which probably contains some sort of carraige returns, its gotten via _InetGetSource()<h2>Racing Today</h2><ul><li><a href=/goracing/racing/racecard/default.asp?courseKey=9&fromG1=&raceno=0&raceDate=20100602&locCode=crt>Cartmel</a> </li><li><a href=/goracing/racing/racecard/default.asp?courseKey=19&fromG1=&raceno=0&raceDate=20100602&locCode=fon>Fontwell Park</a> </li><li><a href=/goracing/racing/racecard/default.asp?courseKey=27&fromG1=&raceno=0&raceDate=20100602&locCode=kmp>Kempton Park</a> </li><li><a href=/goracing/racing/racecard/default.asp?courseKey=37&fromG1=&raceno=0&raceDate=20100602&locCode=ntt>Nottingham</a> </li><li><a href=/goracing/racing/racecard/default.asp?courseKey=42&fromG1=&raceno=0&raceDate=20100602&locCode=rip>Ripon</a> </li></ul>The variables are underlined, and the Green is what Im after (there may be more or fewer lines in the string)If you are able and willing I would love an explaination of how you formulated any pattern you might provide Edited June 2, 2010 by JohnOne AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
UEZ Posted June 2, 2010 Share Posted June 2, 2010 Try this: ... $aRegEx = StringRegExp($line, '.*>(.*)</a>', 1) If IsArray($aRegEx) Then ConsoleWrite($aRegEx[0] & @CRLF) ... Where $line is the line your are reading. BR; UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
JohnOne Posted June 2, 2010 Author Share Posted June 2, 2010 Works a treat UEZ, Thank you very kindly. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
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