Pattern Matching Exclude Duplicate Characters
With regular expressions in the mathematical sense, it's possible, but the size of the regular expressions grows exponentially relative to the size of the alphabet, so it isn't practical.
There's a simple way with negation and backreferences.
grep '[spine]' | grep -Ev '([spine]).*\1'
The first grep
selects lines that contain at least one of einps
; the second grep
rejects lines that contain more than one of any (e.g. allowing spinal tap
and spend
but not foobar
or see
).