Hi,

we have a string such as the following:

'word1 word2 "word3 and word 4" word5 word6'

we need to split the string into an array with the following criteria:

- if any part of the string is inside double quotes then this is 1 array element
- else each individual word is 1 array element

therefore the string above would be broken down as follows:

[1] = word1
[2] = word2
[3] = word3 and word4
[4] = word5
[5] = word6

an arraytolist can be used with space as the delimiter for the words but this 
of course would conflict with the double quotes, what would be the best way to 
achieve this?

thanks for your help 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345761
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to