必須の文字と許可された文字を含む単語全体を一致させたい。
たとえば、
必須の文字は次のとおりです: [ c , a , t ]
許可された文字は次のとおりです: [ y , s]
cat : passed (all mandatories are here)
caty : passed (all mandatories here and only allowed "y" char)
casy : failed (mandatory 't' is absent)
catso : failed (all mandatories but an intruder "o")
これに適切な REGEX コードは何ですか?