Grabing Data Between Two Code Blocks
-
Hi, I have a page that uses screen scrape a page (doesnt have an api) but need to do some customisation with this data. So i need to be able to pick out the data between '' & '' tags. Im assuming the way to do this is via regualr expression (regex)? However im no Regex expert and am in need of some serious help. If anyone could give me the expression i need, i will be able to work out the code required to apply it. Or even a good pointer would be of benefit. Many Many Thanks. :rolleyes:
modified on Monday, July 14, 2008 9:58 AM
-
Hi, I have a page that uses screen scrape a page (doesnt have an api) but need to do some customisation with this data. So i need to be able to pick out the data between '' & '' tags. Im assuming the way to do this is via regualr expression (regex)? However im no Regex expert and am in need of some serious help. If anyone could give me the expression i need, i will be able to work out the code required to apply it. Or even a good pointer would be of benefit. Many Many Thanks. :rolleyes:
modified on Monday, July 14, 2008 9:58 AM
Something like this?:
function getData()
{
var els = document.getElementsByTagName("option");for(i=0;i<els.length;++i)> // Do what you want with the option element (els[i]) here
}
}Hope this helps, --Perspx
"The Blue Screen of Death, also known as The Blue Screen of Doom, the "Blue Screen of Fun", "Phatul Exception: The WRECKening" and "Windows Vista", is a multi award-winning game first developed in 1995 by Microsoft" - Uncyclopedia