RegEx → NFA / DFA
Thompson's Construction
Parse a regular expression · visualise the ε-NFA · simulate input strings
Regular Expression
Expression
/
Examples
a(b|c)*
(a|b)+c
ab*c
(0|1)*
a?b+
(ab)|(ba)
Build Automaton
Syntax Guide
|
Union (alternation)
*
Kleene star (0+)
+
One or more (1+)
?
Optional (0 or 1)
( )
Grouping
ε
Empty string
Concatenation is implicit. Use
ε
for empty string. Supported alphabet:
a–z, 0–9
Simulate Input
Test String
ε-NFA
DFA
Transition Table
Info
+
−
⟳
◎
Enter a regular expression to begin
The automaton will be visualised here using Thompson's construction algorithm
Start state
Accept state
Normal state
ε
Epsilon transition
Start state
Accept state
Build an automaton first.
Build an automaton first.