It's worth pointing out that although the Google code search service is going away, RE2, the regular expression engine built for code search by Russ Cox, is open source (http://code.google.com/p/re2/). RE2 is also the basis for Go's regexp package (http://weekly.golang.org/pkg/regexp/).
See http://swtch.com/~rsc/regexp/regexp3.html for the original writeup from Russ.