Google Code Search helps you find function definitions and sample code by giving you one place to search publicly accessible source code hosted on the Internet. With Google Code Search, you can:
- Use regular expressions to search more precisely
- Restrict your search by language, license or filename
- View the source file with links back to the entire package and the webpage where it came from
The Advanced Code Search page lists the programming languages we’re able to detect. But even if your language of choice isn’t on there, you can still search for code written in that language.
You can also submit your code using its online form. If you have a lot of code to submit, you may want to create a Code Search sitemap, which provides a way to specify all the code files on your site.