5

I've just started looking at regular expressions, and they are pretty cool. They are also pretty annoying looking, and I really don't want to 'learn' them if I can avoid it.

Which is why a nice gui would be great. I'm looking for something intuitive, where you can drag and drop 'condition boxes', select which conditions you want them to select for, get a list of things that your conditions go against, etc. Something which makes building regular expressions easy... heh

If anyone knows of anything, let me know!

Edit: Thanks for all the responses. After looking at some, I googled questions based on them and found this link: https://stackoverflow.com/questions/89718/is-there-anything-like-regexbuddy-in-the-open-source-world

Quickrex seems to have alot of the stuff I want (although not as good as some), plus its integrated into eclipse, which is the IDE I use at the moment.

Community
  • 1
  • 1
Garrett Berg
  • 2,585
  • 1
  • 22
  • 21
  • 2
    It really isn't that difficult to learn what a regular language is. It's definitely worth the time investment. It would be really difficult to use a GUI to express what you wanted from a regular language compared to just typing it out. –  Apr 15 '11 at 01:09
  • 7
    Switch careers or majors :) – Justin Thomas Apr 15 '11 at 01:10
  • I expect to see more of these as the Alice (http://www.alice.org/) students move up – Joel Berger Apr 15 '11 at 01:33
  • @Justin haha, I'm an EE python enthusiast. I took one look at regular expressions and decided it would be better if a GUI did it for me. – Garrett Berg Apr 15 '11 at 02:30
  • 5
    @Garrett Given your EE background, you may be intrigued to learn that [regexes are designs for state machines](http://perl.plover.com/Regex/article.html). Once you [understand the basic building blocks](http://stackoverflow.com/questions/4736/learning-regular-expressions/2759417#2759417), regexes become useful tools. – Greg Bacon Apr 15 '11 at 04:02
  • wanted to mention that if/when you do want to roll your own regexes, the xms regex flags are pretty neat. Two of them let you space and comment your regexes. The other one escapes me at the moment... oh yeah it affects what ^ and $ do... – wprl Apr 15 '11 at 04:39

10 Answers10

6

Regexpal isn't a GUI, but it is handy for testing to see if you've built a regex that matches the correct stuff.

http://regexpal.com/

And at the bottom of regexpal.com is a link to regexbuddy, which seems to be closer to what you are looking for:

http://www.regexbuddy.com/

Calvin
  • 4,177
  • 1
  • 16
  • 17
  • thanks. regexbuddy is EXACTLY what I was looking for, but I wanted a free one. I was hoping someone in the open source world had developed this relatively simple (but tediously complex) application. – Garrett Berg Apr 15 '11 at 02:00
  • after you suggested regbudy, I did a search and found this post: http://stackoverflow.com/questions/89718/is-there-anything-like-regexbuddy-in-the-open-source-world I'm checking it out now – Garrett Berg Apr 15 '11 at 02:07
3

I use RegExRX, it is in the App Store (for MAC). It is very useful and the pulldown menus help you construct expressions. Their website is here: http://www.mactechnologies.com/index.php?page=downloads#regexrx

Nevertheless studying a bit about them will get you far. If you are on a Mac try for example "Searching with Grep" help section in TextWrangler.

=====

Addition: Of late I have being using http://regex101.com/. Really good.

Lucas Vall
  • 49
  • 3
2

Online Regular Expression Analyzer for Perl.

See also this collection of other Perl regex links: My Favourite Regex Tools

toolic
  • 57,801
  • 17
  • 75
  • 117
2

What you are looking for is RegexMagic - (From the creator of RegexBuddy)

(Although I would strongly recommend learning regex syntax - its not that hard and the time you spend will pay for itself many times over. See: regular-expressions.info)

ridgerunner
  • 33,777
  • 5
  • 57
  • 69
1

There are a lot of GUIs for assisting you in writing regular expressions and testing them but there isn't one for writing regex for your (there are some tools with very limited scope). Asking a tool write regex for you is like asking for a tool to write Python code for you:)

A decent regex statements may get fairly complex but learning how to write them is not..

Teoman Soygul
  • 25,584
  • 6
  • 69
  • 80
  • thanks. I guess I looked at it as if it were another programming language, but without anything near the debugging capabilities of python. Reading the tutorials and example code makes me want to cry a little. I guess I just have to get down to it, with the help of some of these tools. – Garrett Berg Apr 15 '11 at 01:56
1

Although this is for Ruby and not python, I've found http://www.rubular.com/ to be quite good at regex testing.

Tim O
  • 731
  • 5
  • 11
  • are ruby regexps the same as python? Edit: I know I've heard java and C are different, although why makes me very confused. – Garrett Berg Apr 15 '11 at 01:54
  • See this question: [ruby vs python regex](http://stackoverflow.com/questions/5671653/ruby-regex-vs-python-regex) – Tim O Apr 15 '11 at 04:09
0

I don't think there is such a program with "codition boxes" and stuff, but the regex coach is very useful for exploring regex.

Jochen Ritzel
  • 104,512
  • 31
  • 200
  • 194
0

If you're using a mac, the text editor Espresso from Macrabbit has really fantastic interactive regex abilities. It's not a GUI per se, but you can see results as you type.

Em McDonald
  • 198
  • 9
0

There are regular expression testers available online, but probably no tools for generation. Usually, when you generate some code using a gui tool, you end up having much more redundant and inefficnent code than a human generated one. This is true in general: gui toolkit generation tool for scripting languages, excel-to-latex table conversion, ..., and probably for most other things, and probably the same will be true for regular expressions.

However, there are ways to reduce clumsiness in regular expressions. For example in Ruby, you can define regular expression as parts that you will repeatedly use e.g. /small_regex/, and refer to them within larger regular expressions e.g., /foo#{small_regex}bar/, Regexp.union(small_regex1, small_regex2), and so on.

sawa
  • 165,429
  • 45
  • 277
  • 381
0

Checkout Rx Toolkit that comes with Komodo. But you'll need to type in the regular expression, some flags can be checked on/off. It's gui based.

user5858
  • 1,082
  • 4
  • 39
  • 79