![]() In between the quotes, the \ character will need to be escaped ( \\ to evaluate for \). Useful when searching literally for a string that may conflict with the search pattern syntax. Set the search pattern with a dedicated parameter. ![]() Only include results in files whose full path matches the regexp.Įxclude results from files whose full path matches the regexp. Repo:sourcegraph/sourcegraph rev:v3.14.0 mux See our revision syntax documentation to learn more. rev: can only be used in conjunction with repo: and may not be used more than once. Search a revision instead of the default branch. Repo:gorilla/mux testroute repo:^github\.com/sourcegraph/ muxĮxclude results from repositories whose path matches the regexp. is equivalent to repo:regexp-pattern rev:rev. If the regexp ends in that revision is searched instead of the default branch (usually master). A repository's path is a string such as /myteam/abc or /xyz that depends on your organization's repository host. Only include results from repositories whose path matches the regexp-pattern. The following keywords can be used on all searches (using RE2 syntax any place a regex is accepted): rev:rev Make the search language-aware by adding a lang: keyword. Match call-like syntax with an identifier New having two or more arguments, and the first argument matches ctx. Here is a brief overview of valid syntax: Search pattern syntax See the dedicated usage documentation for more details. Structural search is a way to match richer syntactic structures like multiline code blocks. Structural searchĬlick the toggle to activate structural search. Matching is case- insensitive (toggle the button to change). Quoting strings in this mode are interpreted exactly, except that special characters like " and \ may be escaped, and whitespace escape sequences like \n are interpreted normally.Īs in Standard search, we support RE2 syntax. Using the delimiter syntax /./ avoids the need for escaping spaces. The \ escapes the space and treats the space as part of the pattern. Spaces between non-whitespace strings is converted to. In this mode spaces between patterns mean "match anything". Only use this mode if you find it more convenient to write out regularĮxpressions without enclosing them in /./. You can achieve the same regular expression searches in the default Standard mode by enclosing patterns in /./, so Match documents containing both foo and bar anywhere in the document. No need to add quotes, we match foo followed by bar, with exactly one space between the terms. Standard search matches literal patterns exactly, including puncutation like quotes. A search pattern is optional and may be omitted when searching for commits, filenames, or repository names. A search pattern is required to match file content. This section documents the available search pattern syntax and interpretation in Sourcegraph.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |