I think that's less efficient than:
/^(?=[smtwhfa]*$)(?!.*(.).*\1)/
but I'm too busy right now to find out.
_____________________________________________________
Jeff[japhy]Pinyan:
Perl,
regex,
and perlhacker, who'd like a job (NYC-area)
s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;
Again, another genius here. The regex you supplied also works perfectly. As far as efficiency goes, I'm not sure it will matter much in this situation. I am interested though in how you would go about testing speed and efficiency for something like this. I'm sure it's not as simple ( and unreliable) as loading up 1000's of strings and timing execution with a watch.