Google Code Search supports POSIX extended regular expression syntax, excluding backreferences, collating elements, and collation classes. To search for a space character, escape it with a backslash, as in hello,\ world. You can search for literal strings by enclosing the strings in quotation marks, as in "hello, world".
We also support the following Perl extensions:
\w |
Matches a word character. (alphanumeric plus "_") |
\W |
Matches a non-word character. |
\s |
Matches a whitespace character. |
\S |
Matches a non-whitespace character. |
\d |
Matches a digit character. |
\D |
Matches a non-digit character. |
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. We make as much code searchable as possible, including code where we can't detect the language. When we're able to detect the programming language for a file, we indicate that in the search results, and you can restrict your search to code written in that language.
If we're not detecting a language you care about, the file: operator can be useful to search for files with a specific extension. For example, you could restrict your search to files with a .x or .abc extension with a query like myquery file:\.(x|abc)$. If we're not detecting a language you think is important, be sure to let us know.
lang: operator, which restricts by programming language (e.g., lang:"c++", -lang:java, or lang:^(c|c#|c\+\+)$)license: operator, which restricts by software license (e.g., license:apache, -license:gpl, or license:bsd|mit)package: operator, which restricts by package URL (e.g., package:"www.kernel.org" or package:\.tgz$)file: operator, which restricts by filename (e.g., file:include/linux/$ or -file:\.cc$)The argument to each of these operators can be either a quoted literal string or a regular expression. As illustrated in some of the examples above, each of the operators can be used as a negative by placing a minus sign ("-") in front of it.
LICENSE, LICENCE, COPYRIGHT, COPYING). If we can't find a license, we indicate that the license is "Unknown." Please note that our license detection is not perfect -- we try to list the license as indicated by the code's author, but we can make mistakes and sometimes the author indicates the wrong license. The Code Search results also can't tell you what patents may cover a piece of software. We tell you what we can about the likely license terms, but understanding the legal requirements to reuse a piece of code is your responsibility.robots.txt, so there are a couple ways you can block us from crawling your code:
Disallow: line. Learn more.robots.txt in the root directory with the following:
User-agent: *
Disallow: /
Please note that it may take some time for Code Search to update its index and remove your code. If you have an urgent request, please let us know by emailing codesearch-issues@google.com.