# Search syntax

> Every search rule, its values, and how to combine them, plus regular expressions.

## Enter a rule

1. Type `/` in the search field, at the start or after a space. The list of rules opens.
2. Pick a rule with the arrow keys and **Return**, or press its number.
3. Type the value.
4. Press the space bar to finish the rule.
5. Type your keyword, or press `/` to add another rule.

The rule appears as a colored label in the field. Press **⌫** to remove a whole rule. While the list is open, press `/` again to type a literal slash.

Rules and a keyword work together. `app:Xcode lang:swift error` finds Swift text from Xcode that contains "error".

## Rules

Each rule has an exclusion form that starts with `-`.

| Rule | Exclusion | Filters by |
|---|---|---|
| `app:` | `-app:` | The app the item came from. |
| `date:` | `-date:` | When you copied the item. |
| `type:` | `-type:` | The kind of item. |
| `lang:` | `-lang:` | The code language. |
| `len:` | `-len:` | The text length. |

### app

The app name, matched without regard to case. Part of a name is enough. Use `+` for several apps, and quotes for names with spaces.

```text
app:Safari
app:Safari+Chrome
app:"Google Chrome"
-app:Terminal
```

### date

A date or a period. Combine several with `+`.

| Value | Meaning |
|---|---|
| `2026-02-24` | That day. `YY-MM-DD`, `YYYY/MM/DD`, and `YYYY.MM.DD` also work. |
| `today`, `yesterday` | That day. |
| `this week`, `last week` | The calendar week. |
| `this month`, `last month` | The calendar month. |
| `this year`, `last year` | The calendar year. |
| `last 7 days`, `last 2 weeks` | The most recent days or weeks, counted from now. |

```text
date:today
date:last week
date:today+yesterday
-date:2026-02-24
```

### type

One or more of `image`, `code`, `text`, `url`, `file`, `color`, and `lan`. Join them with `+` or `|`.

- `text` includes rich text.
- `lan` means items received from other devices through [LAN sharing](https://deckclip.app/docs/guides/lan-sharing).

```text
type:image
type:image+code
-type:file
```

### lang

The code language, matched without regard to case. Join several with `+` or `|`.

Values: `swift`, `python` (`py`), `javascript` (`js`), `typescript` (`ts`), `java`, `c#` (`csharp`), `c++` (`cpp`), `go`, `rust`, `ruby` (`rb`), `php`, `html`, `css`, `sql`, `shell` (`bash`, `zsh`, `sh`), `json`, `xml`, `yaml` (`yml`), `markdown` (`md`), and `code` for code in any other language.

```text
lang:swift
lang:swift+python
-lang:json
```

### len

The length of the text, in characters. Start with `<`, `>`, or `=`. A number alone means equal. Only text is filtered. Other kinds still show, but lower in the list. `size:` works the same way.

```text
len:<100
len:>1000
-len:<20
```

## Regular expressions

Put a pattern between slashes to search with a regular expression. The search is case-sensitive.

```text
/\d{4}-\d{2}-\d{2}/
/^https?:\/\//
/(foo|bar)_\w+/
```

Regular expressions search the text of every item, so they can take a moment on a large history. A pattern that is not valid returns no results.

- Previous: [Keyboard shortcuts](https://deckclip.app/docs/reference/keyboard-shortcuts.md)
- Next: [Troubleshooting](https://deckclip.app/docs/reference/troubleshooting.md)

---

- HTML: https://deckclip.app/docs/reference/search-syntax
- 中文: https://deckclip.app/zh-cn/docs/reference/search-syntax.md

© 2026 Yuze Pan
