On 15 Dec 2005 12:26:07 -0800, Mystilleef <[EMAIL PROTECTED]> wrote:
> I want a pattern that scans the entire string but avoids
> returning duplicate matches. For example "cat", "cate",
> "cater" may all well be valid matches, but I don't want
> duplicate matches of any of them. I know I can filter the
> list containing found matches myself, but that is somewhat
> expensive for a list containing thousands of matches.

Probably the cheapest way of de-duping the list would be to dump it
straight into a set, provided that you aren't concerned about the
order.

--
Cheers,
Simon B,
[EMAIL PROTECTED],
http://www.brunningonline.net/simon/blog/
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to