I want to search a repository for any files that end in *Test.java*
but if I search for *Test.java*
I just get files that contain that exact string.
I can't find any information anywhere that suggests this is possible. Is this just due to limitations of indexing such an enormous amount of data?
I'd like to find a way to search a repo for all classes ending in Test
.
Wildcards take the place of one or more characters in a search term. A question mark (?) is used for single character searching. An asterisk (*) is used for multiple character searching.
You can search globally across all of GitHub Enterprise Server, or scope your search to a particular repository or organization.
The easiest way to find a file in a repository is to use the file finder. You can activate it at any time when you are in repository view by pressing t. See this screenshot from the official annoucement:
The file finder will perform some fuzzy matching using the characters you input into the "search box".
Check out the search syntax page:
https://help.github.com/articles/search-syntax
And searching in repositories:
https://help.github.com/articles/searching-repositories
For this particular one:
Test.java in:name extension:java language:java
Edit 1:
Here's a picture to explain how to view code matches instead of repository matches:
Edit 2:
Turns out the comment above was right. This is what the GitHub people say:
Hi,
The easiest method for finding files within a repository is to use the file finder:
https://github.com/blog/793-introducing-the-file-finder
You can also use the "in:" search qualifier which allows you to tell search to match filenames as well:
https://help.github.com/articles/searching-code#search-in
Hope that helps!
Edit 3:
Although it doesn't use wildcards as we're used to, it uses regular expressions to find substrings of the strings you type. See below, I typed "SandTest.java" and it produced wild-card like results.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With