Regular Expression GUI?
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: Than开发者_如何学Cks 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.
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/
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.
Online Regular Expression Analyzer for Perl.
See also this collection of other Perl regex links: My Favourite Regex Tools
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)
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..
Although this is for Ruby and not python, I've found http://www.rubular.com/ to be quite good at regex testing.
I don't think there is such a program with "codition boxes" and stuff, but the regex coach is very useful for exploring regex.
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.
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.
One of the new players in the game makes it really easy to define tests and work in a red => green style with your regexs is http://refiddle.com. Right now it has runners for JavaScript, Ruby and .NET, bu more are on the way.
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.
精彩评论