Discussion Thread
Data Extractor
Message Thread

Extract any data, including email addresses and URLs from your files and webpages.
Posted in the Data Extractor Forum.
Javascript help
Hi,
I'm working on some javascript to extract a couple of pieces of data I need - if there's a phrase present in the page, and the title of that page.
What I have so far will tell me if the page has the phrase "0 results found." However, it would be even better if the script returned every page that has "x results found" (x being any number) except for "0 results found." I'm sure there's a simple way to do this with regex or javascript. I just need some help figuring out how to write it. How would I specify "x results found"? (x being any positive integer except for 0). Thanks!
Here's what I have so far:
DataExtractor.SetColumns(2);
DataExtractor.AddHeader(1, 'Null Result');
DataExtractor.AddHeader(2, 'Title');
var objRE = '0 results found';
var objResults = document.body.outerHTML.match(objRE)
if (objResults) {
for (var i=0; i objResults.length; i++) {
DataExtractor.StartNewResult();
DataExtractor.AddResult(1, objResults[i]);
DataExtractor.AddResult(2, document.title);
}
}
Javascript help
Try a regex of "\d results found"