Here's what I usually do: <cfscript> loc = refind(text, thing, 1, 1); while (loc.pos[1]) { //do stuff.... loc = refind(text, thing, 1, loc.pos[1]+loc.len[1]); } </cfscript>
It's 1 extra line of code, but it means only doing n+1 searches, where n is the number of loops. --Ben Doom Bobby Hartsfield wrote: > Ahh... I was REALLY hoping you were right about that. That would have been > great. In any event, I learned something new about refind() so thanks! I'll > always think of you and the time we shared in this thread when I use it. > hehe > > As for running the regex twice... Since looping a space delimited list would > make ME weep... this is the only other way I could think of ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Get the answers you are looking for on the ColdFusion Labs Forum direct from active programmers and developers. http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid-72&catid=648 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292784 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4