I have a workaround for this, but was hoping to find a purely regex solution.
The requirements are:
- has one required character
- only pulls from a pool of approved characters
- minimum length of 4
- single word, no whitespace
e.g.
required character: m
pool of characters: [a,b,e,l]
Possible matches:
mabel
abemal
labeam
won't match:
a mael
ama
label
So far I have this expression, but putting a {4,} after it thinks I'm talking about multiplying word matches by 4.
^\b(?:[abel]*[m]+[abel]*)\b