I have to parse some complex links like
<a href="" class="link_orange" >>g name="lpg2" src="" alt="Link Popularity
Gauge" border="0" width="63"></a>
or
<a href="" class="link_white">Click here to find
out</a>
I need a CFSCRIPT to do that. I was successfully able to get the link using
beow pated cfscsipt. But Also I need is if it is a image link then it
should say Image Link - No Text else get the text means name of the link.
<cfscript>
function GetAnchor(str) {
var output = ArrayNew(1);
var i=1;
var start = 1;
var matchStruct ="";
while(1 eq 1){
reFindNoCase("<[[:space:]]*a[[:space:]]*[^<]*href[[:space:]]*=[[:space:]]*""
([^<]*)""",str,start,1);
if(arrayLen(matchStruct.len) lt 2) { return output; }
output[i] = Mid(str,matchStruct.pos[2],matchStruct.len[2]);
start = matchStruct.pos[2];
i = i + 1;
}
}
</cfscript>
Any help is appreciated. Thanks in advance.
Ketan Patel
G3 Technology Group, LLC
Graphics III Advertising, Inc.
(410)789-7007 or (800)783-1799
"It's Not Creative if it doesn't Sell."
http://www.g3group.com <http://www.g3group.com>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

