Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Regular expressions converting into a diagram [closed]

Tags:

regex

diagram

Is there any software to convert a regular expression into a diagram to show the finite state machine will work. I find it helpful to have things pictorial to aid in bug fixing and ensuring that the regular expression is correct.

like image 890
Ed Heal Avatar asked Apr 26 '12 13:04

Ed Heal


People also ask

How do I convert FSA to regex?

To convert the regular expression (RE) to Finite Automata (FA), we can use the Subset method. Subset method is used to obtain FA from the given RE. Step 1 − Construct a Transition diagram for a given RE by using Non-deterministic finite automata (NFA) with ε moves. Step 2 − Convert NFA with ε to NFA without ε.

What is [] in regular expression?

The [] construct in a regex is essentially shorthand for an | on all of the contents. For example [abc] matches a, b or c. Additionally the - character has special meaning inside of a [] . It provides a range construct. The regex [a-z] will match any letter a through z.


1 Answers

I really like http://www.regexper.com/ which looks like it uses Parcon.

Example (live link):

Regexp visualization example

like image 99
Christopher Weiss Avatar answered Oct 05 '22 08:10

Christopher Weiss