2 ms·
Google wrote a regex code search engine based on trigrams, and you can download it[1]. I don't think Lucene supports regexes, but it can do some somewhat simple
by mtdewcmu 13y ago
Google wrote a regex code search engine based on trigrams, and you can download it[1]. I don't think Lucene supports regexes, but it can do some somewhat simpler pattern matches, and I don't necessarily see why regexes are necessary for searching code. Lucene does a lot more for search than match strings, and I don't necessarily see why searching code is fundamentally unlike searching other kinds of documents, so a lot of those features might help you get much better results.
[1] http://swtch.com/~rsc/regexp/regexp4.html http://swtch.com/~rsc/regexp/regexp4.html