# Search and regex

> How the search boxes and exclude filters in the desktop app match text and regular expressions.

Every panel’s search box, and the [filters](/docs/desktop/settings/filters/) that hide entries, match text the same way. Each panel’s page says which parts of an entry its search looks at.

## Plain text

Text matches anywhere, ignoring case. Spaces are matched as typed, so `not found` only matches those two words side by side. An empty box shows everything.

![The Console toolbar with warn typed in the search box and the regular expression toggle off](/_astro/search-regex-off-light.SJ-6Gv34_2fiBDP.webp)![The Console toolbar with warn typed in the search box and the regular expression toggle off](/_astro/search-regex-off-dark.B2jkkZjj_UGQuI.webp)

The Console toolbar with warn typed in the search box and the regular expression toggle off

## Regular expressions

Turn on **Use regular expression** at the end of the box and write the expression as `/pattern/flags`, such as `/warn|error/i`.

![The Console toolbar with /warn|error/i typed in the search box and the regular expression toggle on](/_astro/search-regex-on-light.DeEbuHXx_Z2g7Gjv.webp)![The Console toolbar with /warn|error/i typed in the search box and the regular expression toggle on](/_astro/search-regex-on-dark.q2x9be4A_1G6cCV.webp)

The Console toolbar with /warn|error/i typed in the search box and the regular expression toggle on

* An expression is case-sensitive unless you add the `i` flag. The `g` and `y` flags are ignored.
* Text without the slashes, such as `warn`, isn’t an expression.
* Where a search looks at several parts of an entry at once, such as a log’s message and its objects, `^` and `$` match the start and end of all of them together.

## Invalid expressions

While the expression is invalid or unfinished, the box is outlined in red and nothing is filtered. When you add a filter, its button stays disabled until the expression is valid.
