Need help finding and changing a string using Coldfusion

Hi

Using ColdFusion, what is the easiest way to find links like the one below in a web page, and removing the tag so its no longer a link.

The link text, in this case "top executives" needs to stay.  Just don't want it to be a clickable link.

The key here is that all these links will have both the "XYZ" folder and the ".htm" extension, which makes them unique on the page.

I am slightly familiar with regex, but not good enough to do this on my own.

<a href="/XYZ/management/top-executives.htm"><u>top executives</u></a>

Thx

Michael
bigmikey88Asked:
Who is Participating?
 
_agx_Commented:
May want to change the question tags. Since it is really about reg expressions,  tagging it with "Regular Expression" will attract more attention from the regex guru's, not just CF folks.
1
 
Pawan KumarDatabase ExpertCommented:
Try using replace function

REPLACE(yourstring, '.htm' , 'z' )

I am using z , you can use anything. this will the link will be disabled.
0
 
bigmikey88Author Commented:
Hi Pawan,
Thx for helping

The string I am searching for varies so I think I need to use wildcards.  If so does that mean I need an regex?

For example, I only know the beginning and end of the search string:

<a href="/XYZ/     this part varies              .htm">
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.