# Can't replace with empty string (to delete)?

**URL:** <https://forum.literatureandlatte.com/t/cant-replace-with-empty-string-to-delete/46211>\
**Category:** Scrivener for macOS\
**Tags:** support, searching\
**Created:** [July 7, 2019, 12:27pm UTC](https://forum.literatureandlatte.com/t/cant-replace-with-empty-string-to-delete/46211 "2019-07-07T12:27:16Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![scottaparson](https://forum.literatureandlatte.com/user_avatar/forum.literatureandlatte.com/scottaparson/32/35674_2.png) [@scottaparson](https://forum.literatureandlatte.com/u/scottaparson)\
**Post date:** [February 19, 2011, 6:05pm UTC](https://forum.literatureandlatte.com/t/cant-replace-with-empty-string-to-delete/46211/1 "2011-02-19T18:05:50Z")

</div>

I tried to find a string of text and replace it with nothing. I type in the text string and it finds it, but when I leave the replace text box blank, the “Replace” button grays out and I can’t continue with the replace. Bug or feature?

Thanks,

Scott P.

---

<div class="post-metadata">

**Author:** ![StefanoCecere](https://forum.literatureandlatte.com/letter_avatar_proxy/v4/letter/s/977dab/32.png) [@StefanoCecere](https://forum.literatureandlatte.com/u/StefanoCecere)\
**Post date:** [July 7, 2019, 12:27pm UTC](https://forum.literatureandlatte.com/t/cant-replace-with-empty-string-to-delete/46211/2 "2019-07-07T12:27:16Z")

</div>

it seems the find and replace doesn’t allow the replace field to be empty “” (something that i often do to delete some text strings).  
the “replace” button is deactivated if the Replace field is empty!

i think we should have the possibility to replace any found string with nothing to delete. like most of text editors do

---

<div class="post-metadata">

**Author:** ![lunk](https://forum.literatureandlatte.com/user_avatar/forum.literatureandlatte.com/lunk/32/15732_2.png) [@lunk](https://forum.literatureandlatte.com/u/lunk)\
**Post date:** [July 7, 2019, 12:39pm UTC](https://forum.literatureandlatte.com/t/cant-replace-with-empty-string-to-delete/46211/3 "2019-07-07T12:39:13Z")

</div>

If you select "text ", i.e include a space in the text you want to delete, you can replace it with a space.

---

<div class="post-metadata">

**Author:** ![StefanoCecere](https://forum.literatureandlatte.com/letter_avatar_proxy/v4/letter/s/977dab/32.png) [@StefanoCecere](https://forum.literatureandlatte.com/u/StefanoCecere)\
**Post date:** [July 7, 2019, 1:38pm UTC](https://forum.literatureandlatte.com/t/cant-replace-with-empty-string-to-delete/46211/4 "2019-07-07T13:38:32Z")

</div>

this could be a solution if i could search with a " " in the search string… in my case i couldn’t be sure that " " was always there ☹

---

<div class="post-metadata">

**Author:** ![lunk](https://forum.literatureandlatte.com/user_avatar/forum.literatureandlatte.com/lunk/32/15732_2.png) [@lunk](https://forum.literatureandlatte.com/u/lunk)\
**Post date:** [July 7, 2019, 2:26pm UTC](https://forum.literatureandlatte.com/t/cant-replace-with-empty-string-to-delete/46211/5 "2019-07-07T14:26:30Z")

</div>

Well, sesrch for those first and add the space. 🙂

---

<div class="post-metadata">

**Author:** ![ds](https://forum.literatureandlatte.com/letter_avatar_proxy/v4/letter/d/49beb7/32.png) [@ds](https://forum.literatureandlatte.com/u/ds)\
**Post date:** [April 27, 2025, 3:17pm UTC](https://forum.literatureandlatte.com/t/cant-replace-with-empty-string-to-delete/46211/6 "2025-04-27T15:17:23Z")

</div>

How do I do this? If I don’t enter anything into the replace field, the Replace button doesn’t become active:

 ![image](https://forum.literatureandlatte.com/uploads/default/original/3X/a/d/add4e7a70dd3b2d85c53d4d647260c4e6749354f.jpeg)

I found various posts about this. Is this a missing feature?

---

<div class="post-metadata">

**Author:** ![TromboneAl](https://forum.literatureandlatte.com/user_avatar/forum.literatureandlatte.com/tromboneal/32/94_2.png) [@TromboneAl](https://forum.literatureandlatte.com/u/TromboneAl)\
**Post date:** [November 15, 2018, 11:41pm UTC](https://forum.literatureandlatte.com/t/cant-replace-with-empty-string-to-delete/46211/7 "2018-11-15T23:41:20Z")

</div>

I’m finding that if I want to change, for example, “ABC” to “XYZ,” I can use the “Replace and Find” button. However, if I want to change “ABC” to nothing (that is, no text in the replace box), the “Replace and Find” button is grayed out.

Is there a reason for that?

---

<div class="post-metadata">

**Author:** ![AmberV](https://forum.literatureandlatte.com/user_avatar/forum.literatureandlatte.com/amberv/32/13021_2.png) [@AmberV](https://forum.literatureandlatte.com/u/AmberV)\
**Post date:** [April 27, 2025, 4:31pm UTC](https://forum.literatureandlatte.com/t/cant-replace-with-empty-string-to-delete/46211/8 "2025-04-27T16:31:53Z")

</div>

This is indeed a Mac limitation, it might come from the historic Mac standards this dialogue box was based off of. Another odd one is how you can “replace” anything at all rather than a string match, try putting the cursor somewhere with something in the Replace field and click it, it inserts the word. So on the one hand you can use the Replace button in cases where Find is looking for text that doesn’t even exist in the scope, but you can’t use it to remove text.

Other than the workaround given above, which is fine when removing whole words, you can also use the Selected Text scope with the Replace All button for cases where the latter would be too widespread. For example, triple-click on the paragraph that contains the match you want to remove, and hit Replace All.

---

<div class="post-metadata">

**Author:** ![gr](https://forum.literatureandlatte.com/user_avatar/forum.literatureandlatte.com/gr/32/38680_2.png) [@gr](https://forum.literatureandlatte.com/u/gr)\
**Post date:** [August 23, 2025, 6:05pm UTC](https://forum.literatureandlatte.com/t/cant-replace-with-empty-string-to-delete/46211/9 "2025-08-23T18:05:06Z")

</div>

Can’t really believe that I didn’t run into this problem until just now! The fact that Replace All is available but Replace is not, just doesn’t make sense.

Solution (if you are in the Find dialog box): Hit Next. Click into the editor pane, where the first find will now be selected. Hit Delete key if appropriate, cmd-G to get to the next. Rinse and repeat. So, we are just ignoring the Find dialog box after getting to the first hit.

The solution is not entirely obvious, which suggests a fix of the problem is probably wanted. (The cmd-E,cmd-G trick would avoid the consternation of the dialog box. I see, but not a likely path for most users to follow at the get-go.)
