>Charlie/Barney, I've simplified things a bit and changed the code to read
>"indexOf". Take a look at the both versions of code below. The version of
>Rupesh's code works, yet my version does not. Since his code does work, I
>*should* be able to find the value substring in an array of strings using
>this method. Any ideas what might be wrong?
>
>---Rupesh's Sample Code---
><cfset y = ListToArray("rupesh,tom,damon,hemant,ashwin,ram,prank,sanjeev")>
><cfset pos = y.indexOf("damon") + 1>
>
><cfoutput>
>Index of damon: #val(y.indexof("damon") + 1)#<br>
>Value of index: #y[pos]#<br>
></cfoutput>
>
><p></p>
><cfdump var="#y#">
>
> <br><hr width="100%" size="1" noshade> <br>
>
>---My Sample Code---
><cfhttp url="http://ww2.collectorcartrader.com/details.php?adId=90177579"
>method="get">
>
><cfset images = reMatchNoCase("<img([^>]*[^/]?)>",cfhttp.FileContent)>
><cfset pos = images.indexOf("_1thumb.jpg") + 1>
>
><cfoutput>
>pos = #pos#<br>
>image src = #images[pos]#<br>
></cfoutput>
>
><p></p>
><cfdump var="#images#">
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:296174
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4