|
| Web News |
France Upsets Apple's iPhone Party In Europe As Apple Inc. (AAPL) and European mobile operators get ready for the launch of the long-awaited iPhone on Friday, in France the party has been pushed back and the...
Philips France deploys Streamcore solution Streamcore, a provider of automated application visibility and control for business critical networks, has announced that Philips France has deployed Streamcore to optimise network performance and eliminate congestion by...
Deutsche Telekom sells Media&Broadcast to TDF for... Deutsche Telekom AG (NYSE:DT) said it is selling its Media&Broadcast unit to France's TDF for 850 mln eur. It said the deal is expected to close in the first quarter...
Virtual tickets and Wi-Fi part of future Eurostar perks Paper tickets will soon be history aboard the high-speed Eurostar, replaced by virtual ones kept on credit cards or cell phones, the company's director general said in an interview published Monday. "This will be possible within two years when the new generation of microchips...
|
| Recent WebProNews Articles |
BlogWorld: SEO Tips For Bloggers WebProNews is in Las Vegas this week at the BlogWorld and New Media Expo. In the session "Search Engine Optimization: Best Practices", the speakers focused on SEO tips for bloggers Vanessa Fox, formerly of...
Half Of Employers Block MySpace Or Facebook Accessing social networks like Facebook or MySpace while at work may not be possible as research from Barracuda Networks indicates that 50 percent of businesses using Barracuda Web Filters are blocking the sites.
Facebook Welcomes Users To The Social (Ads) Advertising arrives on Facebook in a way that socializes what people do with the products they use, and the relevant ads Facebook can place that cater to those interests. Facebook's disclosure of its Social Ads eceived plenty of attention from the tech world, spanning...
Whisper: Papers Plot Online Ad Network Five major newspaper publishers may be ready to create a national ad network that will let them keep all of their ad revenue in-house. In gambling, the best money to play with is house money. The same goes for...
|
|
11.08.07 Getting All The Link Labels From A String In ColdFusion By
Raymond Camden
A reader asked me how they could use regex to find all the link labels in a string.
Not the links - but the label for the link. It is relatively easy to grab all the matches for a regex in ColdFusion 8, consider the following code block:
I create a string with a few links in it. I then use the new reMatch function to grab all the matches. My regex says - find all HTML links. It isn't exactly perfect, it won't match a closing A tag that has an extra space in it, but you get the picture. This results in a match of all the links:
But you will notice that the HTML links are still there. How can we get rid of them? I simply looped over the array and did a second pass:
This gives you the following output:
p.s. Running on ColdFusion 7? Try the reFindAll UDF as a replacement to reMatch.
Comments
About the Author: Raymond Camden, ray@camdenfamily.com
http://ray.camdenfamily.com
Raymond Camden is Vice President of Technology for roundpeg, Inc. A long
time ColdFusion user, Raymond has worked on numerous ColdFusion books
and is the creator of many of the most popular ColdFusion community web
sites. He is an Adobe Community Expert, user group manager, and the
proud father of three little bundles of joy.
|
|