Regular expression to match only if there are N unique characters

Viewed 1752

Is there a way how to define regular expression in which will match only if there are at least N unique characters?

Example: (N = 3)

aba  => no match  
abc  => match
abbc => match
ab   => no match
abcd => match
3 Answers
Related