#TRIM(sText)# should do the trick

Or <cfset newText = TRIM(sText)>

E

----- Original Message ----- 
From: <[EMAIL PROTECTED]>


Hi, thanks for both your replies.  Matthew, I've not tried yours yet but will do 
later, esp as you're a kiwi :)

CF Dude, yours nearly works   -  except there *will* always be text after the country 
name.  But we know there'll be a
space and 3 stops, i.e. " ..."  So how can I tell it to "stop" when grabbing the 
country name (i.e. exclude " ..." and
anything after that point.

Thanks

Will

>This works.
>
> <cfset sText = "Green Acres USA">
> <cfset sNewText = Replace(sText, " ", "|")>
> <cfset vText = ListToArray(sNewText , "|")>
> #ArrayLen(vText)#<br>
> #vText[1]#<br>
> #vText[2]#<br>
>
>----- Original Message ----- 
>From: "Matthew Walker" <[EMAIL PROTECTED]>
>
>
>ListToArray(sText , " ") would make "&", "n", "b", "s", "p", and ";"
>all delimiters.
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to