I just went to the ColdFusion Conference in Washington DC and learned how to do this. The session was on Building Intelligent Agents.
I just wrote a tag yesterday that gets a page from Ebay, but using the FindNoCase function I only show the item and the price.
Here is the code: Comments are surrounded by **** Remove before running, or change to CF comments
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Untitled</title>
</head>
<body>
***This parameter is sent in through a form and is the item you want to search for***
<CFPARAM NAME="attributes.searchitem">
<cfhttp url="
method="get"></cfhttp>
<cfset End=1>
<cfset End2=1>
***Need two arrays, one to hold item link, one to hold price***
<cfset LocalArray = arraynew(1)>
<cfset LocalArray2 = arraynew(1)>
***Set condition to always be true, we will break out of look in an ELSE condition below***
<cfloop condition="1">
<!--- Find the searched for item --->
***The links all begin with the following. I found this out by actually going to Ebay and searching and using View Source. Start is the number of the character where the link begins. End2 is where I start from. It is initialized to 1, but it will be the last position of the price of the previous item. See below***
<cfset Start = FindNoCase('<a href="
<cfif Start>
<!--- add the closing tags length to its position to get the true end position --->
***End is the end of the link***
<cfset End=findnocase('</a>',cfhttp.filecontent,start)+4>
<!--- add item to array --->
<cfset arrayappend(localarray,mid(cfhttp.filecontent,start,end-start))>
</cfif>
<!--- Find the associated price --->
***do another FindNoCase, starting at the end of the one above***
<cfset Start2 = FindNoCase('<b>$',cfhttp.filecontent,end)></a>
<cfif Start>
<!--- add the closing tag's length to its position to get the true end position --->
<cfset End2=findnocase('</b>',cfhttp.filecontent,start2)+4>
<!--- add item to array --->
<cfset arrayappend(localarray2,mid(cfhttp.filecontent,start2,end2-start2))>
<cfelse>
<cfbreak>
</cfif>
</cfloop>
<!--- Set the variable CountVar to 0 --->
<CFSET CountVar=1>
<cfset Length = ArrayLen(localarray)>
There were <cfoutput>#Length#</cfoutput> items returned.
<br>
<!--- Loop until CountVar = Length --->
<table><CFLOOP CONDITION="CountVar LESS THAN OR EQUAL TO #Length#">
<tr><td><CFOUTPUT>#LocalArray[CountVar]#</CFOUTPUT></td><td><CFOUTPUT>#LocalArray2[CountVar]#</CFOUTPUT></td></tr>
<CFSET CountVar=CountVar + 1>
</CFLOOP>
</table>
</body>
</html>
Hope that gets you started.
Kathryn