Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Your Python Regular Expression's Best Buddy (pyregex.com)
107 points by igorsobreira on Aug 3, 2013 | hide | past | favorite | 14 comments


A similar gizmo has long since been included in the python distribution:

http://hg.python.org/cpython/log/979eb1bbf6e6/Tools/scripts/...


Related: http://www.debuggex.com/?flavor=python also does visualization in addition to matching (full disclosure: built by me)


While we're on the subject of related tools for other languages and utilities:

Emacs has M-x regexp-builder


For those of you using Ruby, a similar tool exists called Rubular. http://rubular.com/


This is really nice, but I've always enjoyed RegexPal [1]. It's got a nice clean simple UI, displays results immediately and allows me to prototype regular expressions very quickly. Use it almost every time I wrote a regex.

[1] http://regexpal.com/


The problem is, regex flavors differ, and RegexPal uses JavaScript - whose regex flavor is really limited compared to most others (including Python). You should always try to find a tool that uses the regex flavor you are targeting.


It currently shows:

    {m, n} from m to n. m defaults to 0, n to infinity
    {m, n}? from m to n, as few as possible
With the spaces before the max (n) argument. This doesn't work, which testable on the page itself.



Pythex looks really nice. I have used http://gskinner.com/RegExr/ so far and is pretty good.


> This application is temporarily over its serving quota.



Perhaps related -- some genius has registered http://strftime.org and lists out python strftime formatting directives. Very handy as a quick reference.


What's wrong with "man date" ? ;) Except of course if you are using Windows in which case manpages are a no-no.


[deleted]


Click "like" if your Kleene closure is noncommutative!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: