I am trying to find a way using regex to match words that have 3 unique sets of double letters. so far i have this:
r".*([a-z])\1.*([a-z])\2.*([a-z])\3.*"
But that doesn't account for unique sets for double letters. Thanks in advance =)
Maybe like this? Seems to work for me.
r".*([a-z])\1.*((?=(?!\1))[a-z])\2.*((?=(?!\1))(?=(?!\2))[a-z])\3.*"
(?=expr) is a non-consuming regular expression, and (?!expr) is regex NOT operator.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With