This content has been marked as final. Show 8 replies
the replace function
#Replace("<h2>test page</h2>", "<h2>", "" ,"All")#
see how about </h2>. . dosn't go away
> see how about </h2>. . dosn't go away
You could use a second replace statement for the closing tags.
You could use the rereplace() function with some regular expression
syntax that allows for pattern matching.
#rereplace("<h2>test page</h2>", "<\\*h2>", "" ,"All")#
Untested regex but I think that would be the right one.
well you could run it twice, or use a regular expression to remove them. This will strip all html out of the string.
> I have string like that "<h2>test page</h2>" in the db.
For handling html, regular expressions are usually the best bet. Try one of the functions at cflib.org, such as:
I have not tried that one, but there are several that do a good job with variable white space in tags (< / h2> ) and optional attributes.
Oops. I did not see spill's response before replying ;-)
he he im just too fast for you, but it was worth you posting that function is much more substantial than the standard REReplace as it allows you to specify a specific tag.
Haha. Yes, too slow at the keyboard today ;-)