> -----Original Message----- > From: Chris Heilmann > Sent: Wednesday, January 26, 2005 6:50 AM > > I'm stuck on writing a regex that is going to lok ahead to > see if the > > next item in the comma separated list is the same as the > last and, if it > > is, to remove it. > > I doubt that regex could do it, I think you need to loop through it. Sacrilege! But seriously, Regex is especially gifted at this sort of thing. http://www.breakingpar.com/bkp/home.nsf/0/87256B280015193F87256F100058EE66 http://www.samspublishing.com/articles/article.asp?p=24468&seqNum=3 (look under capturing and backreference) http://www.google.com/search?q=remove+repeated+words+regex <><><><><><><><><><> Joshua Olson Web Application Engineer WAE Tech Inc. http://www.waetech.com/service_areas/ 706.210.0168