RegexTester.dev Logo

Regex Tester & Validator

(aaa)*(aaa)* — unary multiples of 3Classic ProblemsFormal RE✨ Emoji Combos

Unary number n = n copies of "a". (aaa)* accepts exactly multiples of 3. The DFA has 3 states tracking n mod 3.

✓ Accepts
εaaaaaaaaaaaaaaaaaa
✗ Rejects
aaaaaaaaaaaa
Loading editor…