4 ms·
Pythex: a Python regular expression editor
- epenn 15y agoThe interface is very clean, simple, and to the point. One suggestion though: It very quickly gives an "Invalid regular expression" error while I'm still typing. From the perspective of the regex parser that is certainly a correct assessment. However from a user's perspective, what's entered is simply incomplete. Although I like the instant evaluation/validation of the expression, it might be a good idea to increase the interval between when the last key is pressed and when the evaluation begins. The need to read the error message along with the textbox turning red while the regex is only incomplete causes an unneeded break in user interaction. That aside, nice work! I'm sure I'll be using it. :)
- larrik 15y agoActually saw this as well today: http://txt2re.com http://txt2re.com Although I like yours better for what I'm doing. Edit: was originally posted here (with a bad title and subsequently ignored): http://news.ycombinator.com/item?id=2449640 http://news.ycombinator.com/item?id=2449640
- clsung 15y agoI prefer http://rubular.com/ http://rubular.com/, not because the language, but for '504 Gateway Time-out' when I connect to pythex.org right now. And I always connect to rubular.com successfully.
- mgrouchy 15y agoMust be getting killed, times out for me. Too bad, because I had wanted to see a python specific version of http://rubular.com http://rubular.com
- orenmazor 15y agoI'm glad there's a non-flash version of this, but if you use a mac, RegExhibit is awesome.
- vibragiel 15y agoSorry, I wasn't expecting to be hackernews'ed and pythex.org is running on a tiny Gandi.net slice with 256MB RAM. I'm temporarily redirecting it to a mirror in App Engine: http://pythex.appspot.com http://pythex.appspot.com Hope you can try it now!
- stevejohnson 15y agoWhy not keep it on App Engine permanently so you don't have to worry about it going down again?
- deleted 15y ago[deleted]
- alisson 15y agoIt would be nice if named groups were supported. Something like: (?P<protocol>https) Being captured like: protocol: https instead of 1: https Nice work!! :)
- vibragiel 15y agoGreat tip! I don't know why I didn't think of that before. I'll sure be adding it as soon as I can :-)
- adamtj 15y agohttp://kodos.sourceforge.net/ http://kodos.sourceforge.net/
- blogimus 15y agoKodos hasn't seen a release since 2006
- silentbicycle 15y agoHave Python regular expressions changed much since then, though? It may be good enough.
- sedachv 15y agoThere's http://weitz.de/regex-coach/ http://weitz.de/regex-coach/ , which you don't need an Internet connection to use.
- stevejohnson 15y agoIt's also Windows only and not specifically for Python, whose regex library has unique features and quirks..
- cypherpunks01 15y agoGreat! It's very simple and useful. One little thing, the regular expression input is in an html form, so if you hit enter (in most browsers) it POSTs to a blank page and you can lose your work. You can make the form onsubmit="return false;" if you never want it to submit.
- zquestz 15y agoRubular is still nicer, part of the charm was the small cheat sheet at the bottom of the page.
- _delirium 15y agoI sometimes use http://regexio.com/ http://regexio.com/ to debug in the reverse direction: given a regex, generate a bunch of strings it matches, which sometimes quickly lets me see "wtf, why would it match strings like that one?" That's something it'd be cool to see explored more; when I'm writing a regex, I usually have in mind a space of strings it's supposed to match, so a very useful debugging tool would be some way of showing me what that space is, so I can see if it's the same as the one in my head. I can't think of any cool infoviz tricks offhand that would be more useful than just a list of matching strings, but there must be something.
- bane 15y agoYou'll probably like http://research.microsoft.com/en-us/downloads/7f1d87be-f6d9-495d-a699-f12599cea030/ http://research.microsoft.com/en-us/downloads/7f1d87be-f6d9-...
- roryokane 15y agoI think it needs an option to match all results, not just the first. This would let me test a regex against many strings at once. You could allow this by adding, below the bubbles, two radio buttons labeled "search" and "findall" - I those are the corresponding Python methods, as far as I can tell.
- Tycho 15y agoSuperb... but I have two major issues (aka please add these features: 1. Can you add an option to return the code for the actual Python function? Then we can just copy&paste right into our source 2. A cheat sheet like on rubular. Make it a pull-up menu from the bottom or something, so it doesn't clutter your nice layout too much
- chromejs10 15y agoAwesome! Wish I had this a while ago during school. This is a good learning tool too since you can see how each addition affects the matching. I like Tycho's idea about have a little cheat sheet. That would add to the "learning tool" idea substantially.
- gojomo 15y agoMy entry into this category of tools uses a (hidden) Java applet to avoid the need to send any data to a server (and the limits of the native JS regexp functionality). See: http://regex.powertoy.org http://regex.powertoy.org It also has an animate mode, which is most interesting on regexes with heavy backtracking. For example, animations of the famous 'prime-digits-count' regex, succeeding (composite) or failing (prime): 49: http://regex.powertoy.org/?pat=/^1%3F%24|^%2811+%3F%29\1+%24/&syn=perlSyntax&anim=1&rep=&in=1111111111111111111111111111111111111111111111111 http://regex.powertoy.org/?pat=/^1%3F%24|^%2811+%3F%29\1+%24... 47: http://regex.powertoy.org/?pat=/^1%3F%24|^%2811+%3F%29\1+%24/&syn=perlSyntax&anim=1&rep=&in=11111111111111111111111111111111111111111111111 http://regex.powertoy.org/?pat=/^1%3F%24|^%2811+%3F%29\1+%24...
- makmanalp 15y agoThis is also good: http://www.cuneytyilmaz.com/prog/jrx/ http://www.cuneytyilmaz.com/prog/jrx/