Search Examples
- Codesearch
- Regex Codesearch
- DuckDuckGo Bang!
- Documentation Search
- Documentation Lists
Codesearch
Standard searches support special characters such as !@#$%^&*()<> As such a search such as [a-z] is a valid search in searchcode. Searches which cannot find exact matches will fall back to finding as close a match as possible.
Example Searches
- mysql_query
- Backbone.Collection.extend
- <?php echo $setting
- $i
- extends CI_Model
- IO::Pipe
- LARGE_FILE_HEADER_SIZE
- =~
- glGetFragDataLocation
FiltersFile Extention Filters
You can filter by file extentions. To do so you add the following text at the end of your search ext:EXT where EXT is the file extention you wish to filter on. The full list of extentions is too large to list but includes the following, php, py, c, cpp, m, makefile, xml, css, js etc... See the below for searches filtered by extention.
Language Filters
You can filter by language. To do so you add the following text at the end of your search lang:LANG where LANG is the language you wish to filter on. The full list of languages is large and includes Python, PHP, Ruby, C++, Mumps, Cobol etc... see Full List of Languages. See the below for examples of searches filtered by language.
Repo Filters
You can filter by repositries if you know the name. To do so you add the following text at the end of your search repo:REPO where REPO is the name the of repository you wish to filter on. See the below for examples of searches filtered by repo.
URL Filters
You can filter by source URL if you know the name. To do so you add the following text at the end of your search url:URL where URL is one of the following.
- github - GitHub
- fedora - Fedora Source Code
- bitbucket - Bitbucket
- sourceforge - SourceForge
- codeplex - CodePlex
- google - Google Code
See the below for examples of searches filtered by url.
- irq_create_mapping url:github
- irq_create_mapping url:google
- mysql_query url:bitbucket
- mysql_query url:sourceforge
- mysql_query url:codeplex
- irq_create_mapping url:fedora
Use Cases
Use Case 1
Daryl is learning how to use Backbone.js and would like to see some real world examples of how to implement a backbone collection. He can search for the following, Backbone.Collection.extend and will see a collection of projects and files already using backbone collections.
Use Case 2
Tim has forgotten how to implement regular expressions in Python. He is pretty sure its re.compile but cant quite remember all the options that exist. A search for re.compile returns a lot of examples for him to follow.
Use Case 3
Sally is looking for a simple regular expression which she can use to find emails in some text using Python. A search for email regex lang:python returns a lot of examples to copy from.
Regex Codesearch
searchcode supports basic POSIX regex commands. An example of each supported case is included below. To trigger the regex search enclose your searchterm/regex using a forward slash E.g. /test/
DuckDuckGo !Bang
All of the DuckDuckGo DuckDuckGo !Bang queries are supported. Use any DuckDuckGo bang syntax as expected, with the exception that !d will redirect to DuckDuckGo itself.
Documentation Search
Where documentation exists relevent to your search it will appear.
Searchable inline documentation exists for the following categories.
Apache 2 Directive
Brainf***
ClojureCOBOL
Emacs
Fossil SCM
FTP Code
GIT
GNU/Linux Command
Hello World
HResult
HTTP Code
Java
JavaScript
jQuery
Linux Kernel Error
Mac iOS Reference
Mac OSX Reference
Mercurial
MySQL Error
MySQL Function
Nginx HttpCoreModule
NT Status
Perl 5
Perl 5 Variable
PHP
Python
Python Exception
Smarty
SQL Server 2008 Function
SQL Server Error
stuntSnippets
SVN
Underscore.js
Visual Basic 6
Win 32 Error
Windows Command
Documentation Lists
View lists of all documentation in a single place.
- List of All Apache Directives
- List of All MySQL Functions
- List of FTP Codes
- List of HTTP Codes
- List of Subversion Commands
- List of GIT Commands
- List of Mercurial Commands
- List of All jQuery Functions
- List of Emacs Commands
- List of COBOL Functions
- List of AppleiOS-Functions
- List of Fossil Commands
- List of Linux Kernel Errors
- List of MySQL Errors
- List of NTStatus Codes
- List of OSX Functions
- List of Smarty Functions
- List of Underscore.js Functions
- List of GNU/Linux Commands
- List of SQL Server 2008 Functions
