[thelist] Regex remove repeats

Joshua Olson joshua at waetech.com
Wed Jan 26 07:41:47 CST 2005

> -----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.


But seriously, Regex is especially gifted at this sort of thing.

http://www.samspublishing.com/articles/article.asp?p=24468&seqNum=3 (look
under capturing and backreference)

Joshua Olson
Web Application Engineer
WAE Tech Inc.

More information about the thelist mailing list