2010-11-27, 11:34 PM
If you're not restricted to the regex itself, what you could do is iterate through all matches, adding them to a set. Then convert it to a list. Does not preserve order, though.
A less efficient method that does preserve order would just check if the match is in the list (linear time) before adding it.
A less efficient method that does preserve order would just check if the match is in the list (linear time) before adding it.

