How can I remove a list of items after found item?
Posted on 2014-12-29
I would like to be able to remove a list of items after another found list item.
A example list item could be : "3000-SE-Pine-St-Seattle-WA-99200"
I wanted to be able to capture everything before "Seattle" but I was thinking a second list could be used to delete everything after any matched 2nd list items.
<cfset streetTypeSuffix = "dr,st,lk,rd,ave,ln,way,ct,loop,blvd,hwy,cir">
So expected results would be... "3000-SE-Pine-St"
Problem is if Seattle is a two word city so I can't always just use "listDeleteAt" @ positions 1,2 & 3 but I do know the values in "streetTypeSuffix" list.