Technically it is possible, but in a very clumsy way.
Even something as simple as abc
already results in a fairly obscure pattern:
^([^a]|a+[^ab]|a+b[ab]*[^abc])*[ab]*$
Fiddle: https://regex101.com/r/xH8dE9/3
Explanation:
^ start of string
(
[^a] not 'a'
|
a+[^ab] 'a' but not 'ab'
|
a+b[ab]*[^abc] 'ab' but not 'abc'
)*
[ab]*$ left-overs at the end of the string
For longer words the pattern grows quadratically. Becomes particularly complicated for words with the first letter appearing more than once, e.g. adam
. It would look something like this (untested):
^([^a]|a+[^ad]|a*(ad)+([^ad]|a[^adm]))*[ad]*$
You may want to use a tool to generate such patterns, rather than write them yourself.