Advertisement

10.31.2007 at 05:21PM PDT, ID: 22931361
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

6.6

Coldfusion: Help required manipulating string

Asked by paddycobbett in Cold Fusion Markup Language

Tags: , , ,

I need some fiddly coldfusion code, which isn't where my expertise lies. Let me explain what i'm trying to do. I have a variable which contains the contents of a coldfusion template file.

I need to replace each occurring link (html anchor) such that:

<a href="index.cfm" class="select">

becomes..

<a href="edit_index.cfm" class="select">

Essentially i'm inserting the "edit_" at the beginning of the file name. Bear in my mind the target url could be at any depth, i.e:

<a href="root/somedir/index.cfm" class="select">

would become...

<a href="root/somedir/edit_index.cfm" class="select">

So, given a variable containing the entire template contents, i need to perform the above conversion on every occurance of an anchor link (for the href variable). Additionally, only links to cfm pages should be converted.

I'm happy to presume that the text "href" only occurs within anchors, so logically i see the algorithm as being:

For each occurance of "href"

LOOP

   1) detemine the indexes of the text inside that "href"

   2) check that the link target is a cfm file

   3) get the index of the last occurring "/" OR "\" within that text, if none exists then use the index of the beginning of the text (to detemine the index of the first letter of the filename)

   4) insert "edit_" at that index

Thanks for all attempts =)Start Free Trial
 
Loading Advertisement...
 
[+][-]10.31.2007 at 10:15PM PDT, ID: 20190929

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11.01.2007 at 05:47PM PDT, ID: 20197691

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11.03.2007 at 04:45PM PDT, ID: 20208509

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11.03.2007 at 11:37PM PDT, ID: 20209755

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11.04.2007 at 06:08AM PST, ID: 20210518

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11.04.2007 at 10:01AM PST, ID: 20211458

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11.04.2007 at 07:51PM PST, ID: 20213741

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11.05.2007 at 06:34AM PST, ID: 20216264

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11.05.2007 at 08:16AM PST, ID: 20217140

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11.05.2007 at 09:23AM PST, ID: 20217706

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11.05.2007 at 10:23AM PST, ID: 20218148

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Cold Fusion Markup Language
Tags: coldfusion, string, first, help
Sign Up Now!
Solution Provided By: hielo
Participating Experts: 2
Solution Grade: A
 
 
[+][-]11.05.2007 at 10:36AM PST, ID: 20218231

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628