google推出开放源代码搜索-搜索技巧

地址:http://www.google.com.hk/codesearch?hl=zh-CN

语法及示例 (有关 regexp 语法的详情)

regexp
搜索正则表达式
go{2}gle hello,\ world ^int printk

"exact string"
搜索精确字符串
"compiler happy"

class:regexp function:regexp
只搜索类(class)名称和函数(function)名称 新!
class:BTree function:laugh
class:hash.*multimap function:.*range

file:regexp
仅在与 regexp 匹配的文件或目录中进行搜索
file:\.js$ XMLHttpRequest file:include/ ioctl
file:/usr/sys/ken/slp.c "You are not expected to understand this."

package:regexp
搜索名称与 regexp 匹配的包。
(包的名称就是其网址或 CVS 服务器信息。)
package:perl.*\.tar\.gz Frodo package:linux-2.6 int\ printk

lang:regexp
仅搜索用与 regexp 匹配的语言编写的程序
lang:lisp xml lang:"c++" sprintf.*%s

license:regexp
仅搜索软件许可与 regexp 匹配的文件.
license:bsd int\ printf -license:gpl heapsort

posted on 2010-06-17 08:50  网络小筑  阅读(374)  评论(0编辑  收藏  举报

导航