Yeah, Regex is pretty good at iteration, but not recursion. I had to write a function to avoid breaking <p> nests and <a> nests (which, of course, would be inside <p> nests) or fixing them if truncation was necessary. It was a pain.
In this case, I would probably build a quick & dirty parser. Find all the quote tags, find all the end quote tags, and calculate pairs. Of couse, I'm a pretty hardcore geek, and other approaches (like MikeyD's) might work better. Anyway, if you come up with an interesting solution, do post it here. I'm always interested in new approaches. --Ben Tony Hicks wrote: > Ah, yeah thanks. > > It just seems like functionality that should be there but isn't.. but > even if it is a shortcoming in regex, where would we be without regex? > I remember trying to do complex replace()s years ago before I knew > what regex was. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:21:803 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/21 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:21 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.21 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
