top | item 6153786

Your Python Regular Expression's Best Buddy

107 points| igorsobreira | 12 years ago |pyregex.com | reply

14 comments

order
[+] gnosis|12 years ago|reply
While we're on the subject of related tools for other languages and utilities:

Emacs has M-x regexp-builder

[+] p99tourism|12 years ago|reply
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/

[+] mbue|12 years ago|reply
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.
[+] thwarted|12 years ago|reply
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.
[+] markdown|12 years ago|reply
> This application is temporarily over its serving quota.
[+] jessedhillon|12 years ago|reply
Perhaps related -- some genius has registered http://strftime.org and lists out python strftime formatting directives. Very handy as a quick reference.
[+] marios|12 years ago|reply
What's wrong with "man date" ? ;) Except of course if you are using Windows in which case manpages are a no-no.
[+] unknown|12 years ago|reply

[deleted]

[+] jfb|12 years ago|reply
Click "like" if your Kleene closure is noncommutative!