A visual tool that allows you to build regular expressions without touching the syntax. Built using C and WebAssembly. Currently in alpha. Try it out at https://regular.express/.
Why did you build this?
Regular expressions are very powerful and very useful, but everybody hates using them. They're completely unreadable, they're hard to edit without syntax errors, they're hard to debug, etc.
Others in the past have tried to solve this problem in a few ways:
- Different syntax. Unfortunately, making the syntax less cryptic doesn't make it much easier to follow the logic. Plus, alternate syntax tends to be way more verbose.
- Helper libraries. This is also more verbose, but less portable across languages - losing one of the main benefits of regular expressions. I have attempted this before, and while it had some benefits, I didn't feel like it made much of a difference overall.
- Tools and debuggers. Many tools now exist to help people understand and test regular expressions. For example, Debuggex will render a railroad diagram of your regex and allow you to test it against arbitrary strings, and regex101 will color-code and explain each part of the regex in plain English. These tools are valuable, but I don't think they go far enough.
My take is different: I believe that regular expressions are only valuable as a textual encoding of a pattern-matching automaton. We should not expect to edit the textual representation directly, in the same way that we do not expect to edit the bytes of an image directly.
Regular Express allows you to create regular expressions without worrying about this encoding.
How is this different from [my favorite regex tool]?
To my knowledge, this is the only regex tool that allows you to actually create regular expressions in a different way. There are many tools to visualize or debug regular expressions (Debuggex, regex101, etc.), but they still require you to manipulate regular expressions in their textual form.
I figure, if we understand regexes better in a visual form, we should just work in that visual form all the time.
What is the status of this project?
The (rather broken) alpha version is already available online at https://regular.express/.
Major things on the roadmap:
- More robust group support, including named groups
- String testing
- Lots and lots of bug fixes and polish
Unfortunately, much of the project will likely need to be rewritten too. This is my first serious C project and I did a real bad job with a lot of things, especially memory management and undo/redo.
(This is what happens when your project begins life as a tech experiment.)