Doug,

This function will return an array of the link labels (the text between each 
"a" tag) in a string.

<cfscript>
function getLinkLabels(string) {
        var result = ArrayNew(1);
        var anchors = ReFindNoCase("<a[^>]*>[^(</a>)]*</a>",string,1,true);
        var i = 0;
        var tag = "";
        while ( ArrayLen(anchors.pos) AND anchors.pos[1] ) {
                tag = Mid(string,anchors.pos[1],anchors.len[1]);
                ArrayAppend(result,ReReplaceNoCase(tag, "</?a[^>]*>", "", 
"ALL"));
                anchors = 
ReFindNoCase("<a[^>]*>[^(</a>)]*</a>",string,anchors.pos[1]+1,true);
        }
        return result;
}
</cfscript>

Will that do what you need?

Steve Bryant
918-449-9440
Bryant Web Consulting LLC
http://www.BryantWebConsulting.com/
http://steve.coldfusionjournal.com/ 

>Well, what I really want to do is takethe page source and whatever the page
>might have in it and strip everyting but what is between the <a></a> tags in
>the page
>
>Does this help?

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:251244
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to