# Searching by language

To restrict your search results to a specific language, use the
[`language`](https://developers.google.com/code-search/reference#filters) or `lang` filter. For example, the following
search restricts the search results to the Java language:

    helloworld language:java

You can also use the `file` filter, as shown in the following example:

    file:\.java

Remember that searches use regular expressions by default. As a result, the
following search doesn't work:

    *.java

Instead, try the following searches:

    \.java
    lang:java