Does anyone know how to use a regular expression in Dart, where maximum two consecutive characters allow.
Example :
aabc //allow
aaabc // not allow
aabc aabc // not allow same string
aabcde //allow
abs cdd ert fgg fgy df //allow
I tried this but it won't work:
([A-Za-z])?!.*\1
([a-zA-Z])-?\1-?\1-?\1-?\1
^(?:([A-Za-z])(?!.\1))$