Jump to content
Sign in to follow this  
jackerPro

COOL COOL PRO?

Recommended Posts

jackerPro

I have html tag:

<span class="results">Date: 23<br />12</span>

I want get 23 and 12 please help me code.

I have use StringRegEx but error. Please help me. Thanks you so much.

Share this post


Link to post
Share on other sites
Paulie

If those 2 thing are always the only 2 numbers in the line, you should be able to StringRegExp just like this

#include <Array.au3>

$String = '<span class="results">Date: 23<br />12</span>'
$Result = StringRegExp($String, "\d{2}",3)

_ArrayDisplay($Result)

Share this post


Link to post
Share on other sites
jackerPro

oh. Thanks for reply. you can help me get number: 23. THanks.

Share this post


Link to post
Share on other sites
jackerPro

I have code HTML:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

</h4><table width="100%" cellpadding="3" cellspacing="5"><tbody><tr><td><p style="text-align: center" /></td></tr><tr><td class="cell"><table border="0" width="100%" cellpadding="1" cellspacing="1"><tbody><tr><td width="82%"><a class="result-link" href=a.asp">My Name</a><br /><span class="results">Date: 23</span></td><td width="18%" valign="bottom"><div style="text-align: right">

I need get Date: 23 from my html code. Please help me. THanks.

Edited by jackerPro

Share this post


Link to post
Share on other sites
JFee

Were you asking how to get "23" from that list?

If you were, $Result[0] contains 23, $Result[1] contains 12


Regards,Josh

Share this post


Link to post
Share on other sites
jackerPro

I have code HTML:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

</h4><table width="100%" cellpadding="3" cellspacing="5"><tbody><tr><td><p style="text-align: center" /></td></tr><tr><td class="cell"><table border="0" width="100%" cellpadding="1" cellspacing="1"><tbody><tr><td width="82%"><a class="result-link" href=a.asp">My Name</a><br /><span class="results">Date: 23</span></td><td width="18%" valign="bottom"><div style="text-align: right">

I need get Date: 23 from my html code. Please help me. THanks.

Share this post


Link to post
Share on other sites
TehWhale

I have code HTML:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

</h4><table width="100%" cellpadding="3" cellspacing="5"><tbody><tr><td><p style="text-align: center" /></td></tr><tr><td class="cell"><table border="0" width="100%" cellpadding="1" cellspacing="1"><tbody><tr><td width="82%"><a class="result-link" href=a.asp">My Name</a><br /><span class="results">Date: 23</span></td><td width="18%" valign="bottom"><div style="text-align: right">

I need get Date: 23 from my html code. Please help me. THanks.

Can you read?

It just pisses me off when N00Bs can't read, or comprehend what is being said.

Were you asking how to get "23" from that list?

If you were, $Result[0] contains 23, $Result[1] contains 12

Edited by JasonB

Share this post


Link to post
Share on other sites
jackerPro

I think, can get it with tag <span class="results">Date: 23</span>

Every one can help me?

Share this post


Link to post
Share on other sites
Paulie

Here you go, works for me again.... why don't you try running the code before spamming..

#include <Array.au3>

$String = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'& _
'</h4><table width="100%" cellpadding="3" cellspacing="5"><tbody><tr><td><p style="text-align: center" /></td></tr><tr><td class="cell">'& _
'<table border="0" width="100%" cellpadding="1" cellspacing="1"><tbody><tr><td width="82%"><a class="result-link" href=a.asp">'& _
'My Name</a><br /><span class="results">Date: 23</span></td><td width="18%" valign="bottom"><div style="text-align: right">'
$Result = StringRegExp($String, "Date: \d+",3)

_ArrayDisplay($Result)
Edited by Paulie

Share this post


Link to post
Share on other sites
TerarinKerowyn

What is the website then I can help you out


Contact via MSN: [email=terarink_msn@hotmail.com]terarink_msn@hotmail.com[/email], yahoo: terarink_yah

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.