Suppose I have the text "HarryMaryJaneHarryxMaryJane" and I want to find the longest duplicate match. If I use /(.+).*?(\1)/ it matches Harry, but the longest match is MaryJane. What is the best approach to this problem? -- Peter Gordon Phone: +972 544 438029 Email: peter at pg-consultants.com Web: www.pg-consultants.com