# Z 1200/replace in buffer \(\#2922\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 4cb8647702d3b13cbc979e52c89d543bd0e295dd

Requested commit: 4cb8647702d3b13cbc979e52c89d543bd0e295dd

Commit: 4cb8647702d3b13cbc979e52c89d543bd0e295dd

Tree: c154fc6b20c80489f197e8358f28bacfcfae1ba7

Author: Piotr Osiewicz

Committer: GitHub

## Message

```
Z 1200/replace in buffer (#2922)

This is still WIP, mostly pending styling. I added a pretty rudimentary
text field and no buttons whatsoever other than that. I am targeting a
Preview of 09.13, as I am gonna be on PTO for the next week.

I dislike the current implementation slightly because of `regex`'s crate
syntax and lack of support of backreferences. What strikes me as odd wrt
to syntax is that it will just replace a capture name with empty string
if that capture is missing from the regex. While this is perfectly fine
behaviour for conditionally-matched capture groups (e.g. `(foo)?`), I
think it should still error out if there's no group with a given name
(conditional or not).
Release Notes:

- Added "Replace" functionality to buffer search.
```

## Parents

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

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