splitting a string into multiple sections

2010-12-03 Thread Rick Colman

If I have a long text string, and want to chop it up into sections and 
extract each section, like:

(1 537 825)

first section is position 1-536
second section is position 537 to 824
third section is 825-end

can someone suggest a CF approach to do it?

have not done it before.

tnx if you can 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:339742
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: splitting a string into multiple sections

2010-12-03 Thread Rick Root

On Fri, Dec 3, 2010 at 12:01 PM, Rick Colman rcol...@cox.net wrote:

 If I have a long text string, and want to chop it up into sections and
 extract each section, like:

 (1 537 825)

 first section is position 1-536
 second section is position 537 to 824
 third section is 825-end

 can someone suggest a CF approach to do it?

you mean like using MID()?

http://www.cfquickdocs.com/cf8/#Mid

Rick

~|
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:339744
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: splitting a string into multiple sections

2010-12-03 Thread Matt Quackenbush

Check the docs for the insert() function.


~|
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:339745
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: splitting a string into multiple sections

2010-12-03 Thread Michael Grant

Left(string,536)
Mid(string,537,287)
Mid(string,825,len(string))


On Fri, Dec 3, 2010 at 12:01 PM, Rick Colman rcol...@cox.net wrote:


 If I have a long text string, and want to chop it up into sections and
 extract each section, like:

 (1 537 825)

 first section is position 1-536
 second section is position 537 to 824
 third section is 825-end

 can someone suggest a CF approach to do it?

 have not done it before.

 tnx if you can 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:339747
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm