# search: Escape seeded project search query in regex mode \(\#61335\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/3ad8086ee8c8d602eaa65ba747433458105e7e7e)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 3ad8086ee8c8d602eaa65ba747433458105e7e7e

Requested commit: 3ad8086ee8c8d602eaa65ba747433458105e7e7e

Commit: 3ad8086ee8c8d602eaa65ba747433458105e7e7e

Tree: 703ddb47f456cab87098104079952ceac08cfeb3

Author: Smit Barmase

Committer: GitHub

## Message

```
search: Escape seeded project search query in regex mode (#61335)

Fixes what https://github.com/zed-industries/zed/pull/57748 does for
buffer search.

When project search is deployed with regex mode enabled and the query is
seeded from the editor's selection or the word under the cursor, that
text is literal, so regex chars in it (e.g. `.` in `z.d`) are now
escaped instead of being interpreted as regex syntax. This follows how
VSCode handles it.

Release Notes:

- Fixed project search queries seeded from the current selection being
interpreted as a regular expression instead of literal text when regex
mode was enabled.
```

## Parents

- [6a8f5a30b3bc0ecc726abdfc3bdbaf2376b85d47](https://git.cafe/gitcafe/zed/commit/6a8f5a30b3bc0ecc726abdfc3bdbaf2376b85d47?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/3ad8086ee8c8d602eaa65ba747433458105e7e7e?format=markdown)
