Related link: http://www.regexlib.com/

The fine coders at RegExLib have
developed a collection of incomprehensible code snippets - and they’re giving
them away for free. That’s right, free regular expressions.

RegExLib is a library of 900+ regular expressions contributed by a
community of regex loyalists. Each is
organized by function (like URI or Email) and rated by visitors.

Your job isn’t just cut-n-paste, you’ll likely have to choose from several
similar regexes. Each regex comes with examples matches and non-matches so
that you can see the author’s intentions, see how liberal the match is, and
see which edge cases are or aren’t covered. These example matches should help
you find a regex that’s close to your needs.

The example matches aren’t exhaustive, so you should definitely test the regex
against your own data. You’ll be aided by the site’s helpful testing feature.
Each regex links off to a testing page where you can run the regex against
your own test matches.

Most of the contributors are also enthusiastic regex bloggers,
http://blogs.regexadvice.com.

Two more things to note. First, the regular expressions don’t have an
explicit license, only this href="http://blogs.regexadvice.com/dneimke/archive/2004/12/07/1971.aspx">statement
of free use. Second, there’s a .NET bias to the site, but since .NET uses
a Perl compatible regular expression syntax you should be able to reuse the
code in any other Perl compatible implementation.