Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there some good visual regular expression editor? [closed]

Tags:

regex

editor

I have learned the basics about basic Regex, but I still feel I am far from being good.

As a beginner, it will be fantastic to have a WYSIWYG editor. So I was wondering if someone can give some recommendation on such editors? For various commonly-used versions of Regex, such as the basic one, the one for Python, for Perl, for bash, ....

Or if you have other nice ways/tools (not necessarily in the form of editor) to recommend for helping master different versions of Regex, that will be nice as well!

Thanks and regards!


MY OSes are Ubuntu 10.10 and Windows 7.

like image 209
Tim Avatar asked Mar 15 '11 13:03

Tim


2 Answers

What is "good" depends on what is most useful to you. For me, though, these are the key features for a good regex editor (besides the ability to test and create regular expressions, of course, which is a prerequisite to be called a "regex editor" :-) :

  1. Displays matches hierarchically with captured groups.
  2. Explains/analyzes an entered regex in plain English, showing a hierarchical tree.
  3. Translates your regex into code for a language of your choice.

RegexBuddy, as @Max mentioned, does all these but there is also a free alternative, Expresso that also does them very well. These two utilities are the only ones I have found with the crucial ability to explain a regex. Here is an example from RegexBuddy:


regex explained in English

like image 69
Michael Sorens Avatar answered Nov 25 '22 09:11

Michael Sorens


I think you will find www.debuggex.com very valuable. Some advantages of debuggex are:

  • Feedback is in real-time, so you can understand what's happening faster
  • The ability to answer the question "Why does/doesn't it match here?" for any position in your text.
  • Very heavy on the visuals, it was a core design decision behind it's creation

enter image description here

At the time of writing, it only supports Javascript. However, more languages are planned for the future.

like image 25
Sergiu Toarca Avatar answered Nov 25 '22 09:11

Sergiu Toarca