Avatar of Michael Robinson
Michael RobinsonFlag for United States of America

asked on 

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
ColdFusion Language

Avatar of undefined
Last Comment
_agx_
SOLUTION
Avatar of Pawan Kumar
Pawan Kumar
Flag of India image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of Michael Robinson

ASKER

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">
ASKER CERTIFIED SOLUTION
Avatar of _agx_
_agx_
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
ColdFusion Language
ColdFusion Language

ColdFusion is a server-side rapid application development platform originally created by Allaire and now sold by Adobe, implementing the dynamic general purpose CFML programming language. The term ColdFusion is sometimes colloquially used to refer to the CFML language (Cold Fusion Markup Language), but can also include discussions of the server software implementation. ColdFusion runs using a customised version of Apache Tomcat. Earlier versions are bundled with JRun.

11K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo