Thank you guys for pointing me to the right direction. The udf StripTags is
really god sent.
Thanks
cfcoder
CFLib.org is your friend :) Check out the function called StripTags.
It does exactly what you want.
http://www.cflib.org/udf.cfm?ID=774
Cedric
Hello Everybody,
I need your help with regular expressions. I'm trying to strip out HTML tags
from a string to pass it to a flash movie.
I've found a script that does this but the problem is that I want to keep some
html formatting specifically the following tags:
b, br, span, i, strong, div,
You may have to use a negative lookahead. Try something like this:
(?!\/?(br|b|span|i|strong|div|p))[^]*
This hasn't been tested and is purely from memory, but I think that
(or something close to it) should remove any tag that is *NOT* the
open or closing tag of one you listed.
For more
Not sure if this has been suggested (coming in late), but this
function works well.
http://www.cflib.org/udf.cfm?ID=774 (Thanks Isaac)
Not a simple regex, but it gets the job done.
On 4/13/06, cf coder [EMAIL PROTECTED] wrote:
Hello Everybody,
I need your help with regular expressions.
Yeah I hawked it. :P
Thanks Jerry.
I love that people like this function so much, it makes me smile
whenever I see it recommended, because I know I've helped them. :)
I wrote an article for CFDJ that should be in the next issue(?) about
an alternative approach of using XML and a CFC to handle
CFLib.org is your friend :) Check out the function called StripTags. It does
exactly what you want.
http://www.cflib.org/udf.cfm?ID=774
Cedric
~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237707
Archives:
HI cfCoder
You could try something along these lines:
reReplaceNoCase(str,(font)[^]*,,all)
replaceNoCase(returnStr,/font,,all)
You could then be selective to the tags you wish to strip out.
Hope this helps.
All the best
Jose Diaz
On 4/13/06, cf coder [EMAIL PROTECTED] wrote:
Hello
7 matches
Mail list logo