rereplace(string, '<[^>]*$', '') This should replace an unclosed tag at the end of the string. It will not fix mismatched tags: <b>this is broken</b becomes <b>this is broken
Not tested, off the top of my head, YMMV, keep your arms inside the ride, etc. --Ben Emmet McGovern wrote: > I need to truncate an output that has html in it to 200 lines. The problem > arises when it truncates at 200 in the middle of a image > > Ex ( Hello world. <img src="img.gif" border="0"> look at this <img src="im ) > > I can't figure out how to strip out an unfinished image tag so I can get rid > of the broken image that displays. > > Any solutions? > > Thanks, > Emmet > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Special thanks to the CF Community Suite Silver Sponsor - CFDynamics http://www.cfdynamics.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:186665 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

