I am looking for a regex to match words formed with specific characters without repeating any character: Example, for a b c and d, how to specify a regex to match those stri
You can use this regex based on negative lookahead:
^(?:([abcd])(?!.*\1)){1,4}$
RegEx Demo
Breakup:
^ Line start
(?: Start non-capturing group
([abcd]) Match a or b or c or d and group it
(?!.*\1) Negative lookahead to fail the match if same grouped char is ahead
){1,4} 1 to 4 occurrences of non-capturing group
$ Line end