Probably worth sorting the string (in lexical order) to avoid doing twice the same regex (if user is sloppy), because the order of char is not the same.