REPEAT .*[abc]{1} as many times as the number of characters in the 2nd string

Unfortunately, it will match "a" repeated three times with no "b" or "c" in the string.

Code:

.*[abc].*[abc].*[abc]
matches not only "abc" and "cba"
but also "aaa"

The correct solution is outlined on my page. But I agree with requinix that it's a terrible application of regular expressions. You should write some code instead; any programming language allows you to check the characters in a loop.