ITCOOKBOOK.com

 Options

Current Time:
Mon Sep 06, 2010 9:46 pm
View unanswered posts

Log in

Username:
Password:
Log me on automatically each visit

Topic Information

Grab something out of a string

 
Post new topic   Reply to topic    ITCOOKBOOK.com Forum Index -> ColdFusion MX7
View previous topic :: View next topic  
Author Message
CoachPrincess
Fresher


Joined: 02 Dec 2006
Posts: 12
Location: Bryan, TX

PostPosted: Sun Dec 03, 2006 10:31 pm    Post subject: Grab something out of a string Reply with quote

I want to fetch something in a string and take the part I want out and then output it.

For example, if I have a string such as: (hello) <h2>@ information then I want to grab just this part: <h2>@ and output it just by it self:<h2>@;

My attempt does the opposite and strips the <h2>@ out of the string:

Code:
<cfset>
<cfset>
<cfoutput>#wrd#</cfoutput>

Gives me output of: (hello) information

What is wrong with my code?
Back to top
View user's profile Send private message
Araya
Fresher


Joined: 02 Dec 2006
Posts: 13
Location: San Diego, CA

PostPosted: Sun Dec 03, 2006 10:31 pm    Post subject: Reply with quote

Go to this site: http://livedocs.macromedia.com/coldfusion/6/CFML_Reference/functions-pt262.htm#1111015

Try Refind, search for "<", it returns pos and len. Then you can get the value from that.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    ITCOOKBOOK.com Forum Index -> ColdFusion MX7 All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Help US Help YOU

 

 

Please complete our short survey and save $17.50 on ITCOOKBOOK.COM.

 

 

Take a look at SAPTrends.com, a new blog dedicated to discussion of SAP Training trends in SAP ERP.

 

 

C# Interview Questions

 

.NET Interview Questions

 

Java Interview Questions

 

Python Interview Questions

 

ColdFusion Interview Questions

 

Linux Interview Questions

 

Linux LPIC 1 Certification Questions

 

Perl Programming Interview Questions