Hi Dave, Your current function will strip out all <> tags, including <img> already.
If you look at the regex and follow it from left to right, what its saying is this: take anything beginning with < which isn't > When you finally get to the next > then take that entire string and replace it with nothing. Ie, remove anything in a tag. Its not tag specific, it'll indescriminately remove <head>, <img>, <a>, etc etc etc. Perhaps your string is coming out in htmleditformat stylee? ie <img> ?? If its does this then the stripHTML function won't catch it. > -----Original Message----- > From: Dave Phipps [mailto:[EMAIL PROTECTED] > Sent: 09 June 2003 08:28 > To: ColdFusion User group > Subject: [ cf-dev ] Strip html and img > > > Hi, > > Really enjoyed CF_Europe. It was good to put some faces to all the > names. Now onto business. > > I have a verity search which uses an index from a query which > grabs some > html from a db and then outputs the results. I am using the > following UDF > > function StripHTML(str) { > return REReplaceNoCase(str,"<[^>]*>","","ALL"); > } > > to strip out the html which seems to be mostly working. Does > anyone know > how I could modify the above to also remove any <img src...> > tags so that > all I get in the results summary is text with no html? > > Thanks > > Dave > > > -- > ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ > > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > For human help, e-mail: [EMAIL PROTECTED] > -- ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] For human help, e-mail: [EMAIL PROTECTED]
