Regex Diagram Visualizer

Instructions

How to Use This Tool:

  1. Enter Regex Pattern: Type your regular expression in the input field (e.g., a(b|c){d}).
  2. Generate Diagram: Click the "Generate" button to visualize your regex as a state diagram.
  3. Explore Transitions: Use the transition buttons to step by symbol to next state.
  4. Swap States: Click on state buttons to jump between different states in the automaton.
  5. Examine Graph: The graph at the bottom shows all states and transitions explored so far.

Examples to Try:

  • abc - Simple sequence
  • a|b - Alternation
  • {abc} - Zero or More
  • [abc] - Zero or One
  • a(b|c){d} - More complex pattern

Note: This tool uses the grammar notation studied in Formal Languages courses in Technical University of Kosice.

Note: Red dots on diagram highlight marks in current state.

Control Panel