Regex to State Machine Diagram
UML|Software Academy| 21 May 2020 | Dusan Rodina - softwareideas.net
Regular expressions can be transformed into a state machine diagram. It is possible to map regex syntax to states and transitions.
The mapping defines the following regex syntax elements:
- Optional expression: (expression)?
- One or more occurrences: (expression)+
- Zero or more occurrences: (expression)*
- Or: (expressionA|expressionB)
Overview of regular expression syntax mapped to UML state machine blocks