Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
samb1 #1
Removing unwanted HTML tags
Guys I have a list of links that I have parsed using regexp. However when I
output them, some of them have html tags still attached as well as the HREF.
Im currently using a regex from a CF book to remove the tags but it doesnt
work. The regex is '<[^>]*>', '', 'ALL')> Here is an example of the links I
output: <td><a href='http://www.rspb.org.uk:80/vacancies/?id=3440305'> Any
help with this is greatly appreciated.
samb1 Guest
-
Unwanted margin tags
A client of mine has been cut/pasting text into Dreamweaver templates I've built using Contribute. The text comes in with additional "margin" tags... -
[PHP] comparing xml files, removing some html tags
Hi, Discussion of xerces will take us out of the mandate of this list. Please download xerces from http://xml.apache.org along with the documents... -
comparing xml files, removing some html tags
Hi, I need to compare two XML files in order to find if they are "similar", i.e their DOM tree have the same structure. The ideia is to use... -
Removing Unwanted Download
I inadvertently downloaded a program that installed itself in a program folder called eZula. I'm running Windows XP Home SP 1. The program... -
Removing Unwanted Objects
I've got a picture of the "teacups" at Disneyworld. The person I want is in the background, and an unwanted person is in the foreground (Not... -
samb1 #2
Re: Removing unwanted HTML tags
Guys
Im still struggling with this if any one has any ideas. Thanks
samb1 Guest
-
samb1 #3
Removing unwanted html tags
Guys I have parsed three different websites for job links. Ive then placed the
links into an array but when I output the array I can see that the links have
html tags around them. I need to remove the tags so that I can perform cfhttp
requests on the links. Here is the code Im using: <!---HTTP Call each site
index attribute from the XML---> <cfhttp method='get'
URL='#Trim(xmlObj.xmlRoot.site.xmlAttributes.index )#'
ResolveURL='yes'></cfhttp> <cfset StartPos = 1> <cfloop condition
='True'> <!---Parse the site index pages for job links---> <cfset
Match = REFindNoCase(#Trim(xmlObj.xmlRoot.site.parse.xmlAt tributes.re)#,
cfhttp.FileContent, StartPos, True)> <cfif Match.pos[1] EQ 0>
<cfbreak> <cfelse> <cfset StartPos = Match.pos[1] +
Match.len[1]> <!---<cfset Foundlinks = Mid(cfhttp.FileContent,
Match.pos[1], Match.len[1])>---> <cfset StripLinks =
#REReplace(#Mid(cfhttp.FileContent, Match.pos[1], Match.len[1])#,'<[^>]*>', '',
'ALL')#> <!---Store the list of FoundLinks into the Links Array--->
<cfset LinksArray= ListToArray(StripLinks)> <cfset counter = 1>
<cfdump var='#LinksArray#'> </cfif> </cfloop> Any ideas
greatly appreciated as im banging my head against another wall.
samb1 Guest
-
samb1 #4
Re: Removing unwanted HTML tags
I close to throwing myself from a top floor window (bit of an exageration) with this one. Thanks
samb1 Guest
-
thejuggler #5
Re: Removing unwanted HTML tags
I've always used this function I wrote. This always works for me.
function StripTags(string) {
pattern = '<[^>]*>';
return REReplaceNoCase(#string#, #pattern#, '' , 'ALL');
}
thejuggler Guest
-
Mike #6
Removing unwanted html tags
How would you modify the regex to remove all html tags except <b></b>
Mike Guest



Reply With Quote

