jackerPro Posted July 14, 2008 Posted July 14, 2008 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.
Paulie Posted July 14, 2008 Posted July 14, 2008 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)
jackerPro Posted July 14, 2008 Author Posted July 14, 2008 oh. Thanks for reply. you can help me get number: 23. THanks.
jackerPro Posted July 14, 2008 Author Posted July 14, 2008 (edited) 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 July 14, 2008 by jackerPro
JFee Posted July 14, 2008 Posted July 14, 2008 Were you asking how to get "23" from that list? If you were, $Result[0] contains 23, $Result[1] contains 12 Regards,Josh
jackerPro Posted July 14, 2008 Author Posted July 14, 2008 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.
TehWhale Posted July 14, 2008 Posted July 14, 2008 (edited) 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 July 14, 2008 by JasonB
jackerPro Posted July 14, 2008 Author Posted July 14, 2008 I think, can get it with tag <span class="results">Date: 23</span> Every one can help me?
Paulie Posted July 14, 2008 Posted July 14, 2008 (edited) 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 July 14, 2008 by Paulie
TerarinKerowyn Posted July 14, 2008 Posted July 14, 2008 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
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