Google Labs has released a Code Search tool (google.com/codesearch).
You can limit the results to languages (lang:), particular licenses (license:), files (file:), and packages (package:). Regular expressions are supported as well.
Language support appears to be limited to the following: Ada, ASP, Assembly, Basic, C, C++, C#, Eiffel, Erlang, Fortran, Java, JavaScript, JSP, Lex, Limbo, Lisp, Lua, Makefile, Mathematica, Matlab, Objective C, Perl, PHP, PostScript, Python, Ruby, Scheme, Shell, Smalltalk, SQL, Tcl, Troff, and Yacc. Wonder why no COBOL, SNOBOL, PL1, Pascal, JCL, etc.? Besides “they’re old languages.” Unfortunately, not everyone is hip and happening, and programmers struggling to support old systems are likely to need a good resource like this. Google, can you add some languages?
Anyhow, support for regular expressions is welcome. The licenses you can use in the searches include: Aladdin Public License, Artistic License, Apache License, Apple Public Source License, BSD License, Common Public License, GNU General Public License, GNU Lesser General Public License, Historical Permission Notice and Disclaimer, IBM Public License, Lucent Public License, MIT License, Mozilla Public License, NASA Open Source Agreement, Python Software Foundation License, Q Public License, Sleepycat License, and the Zope Public License.
Some example searches:
- blowfish lang:javascript
- obfuscate lang:php
- screen.*scrape lang:c
- file:\.js$ sneaky
- find.*path lang:c++ -license:gpl
Seen here.

0 responses so far ↓
There are no comments yet...Kick things off by filling out the form below.
Leave a Comment