Jump to content
Sign in to follow this  
JohnOne

Help a RegEx simpleton ?

Recommended Posts

JohnOne

Im looking for a handout here :P

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 :mellow:

Edited by JohnOne

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites
UEZ

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!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×