Email and URL validation
CO1BTL 3 – ApplySDG 9 — Industry, Innovation & InfrastructureModule 1
A local part, an @, a domain, and at least one dot-separated label after it. The alphabet is abstracted so the diagram stays readable: "a" stands for any letter, and "." and "@" are themselves. Real address syntax (RFC 5322) is far larger, and notably is *not* regular once quoted local parts and nested comments are allowed — which is itself worth knowing.
The expression
aa*@aa*.aa*(.aa*)*The machine below is its minimal DFA — 7 states over {., @, a}. Open it in the playground to see the parse tree and the ε-NFA it came from.
Input
Narration
Start in state {{q0}} with "a@a.a" still to read.
Run many strings
One string per line. A blank line means the empty string.