Zettelkasten Forum

How to search and replace when there is an " (apostrophe) in the query?

I wanted to replace "Chapter with Chapter - this does not work. Can I escape the character somehow so it works?


  • Works for me. How are you trying to do this? I search for "word, check the Replace, type word in the box that opens up, and then click the Replace button. Clicking All replaces all occurrences of "word with word, as expected.

  • @jimmy92049 Yes, you can escape and search for a literal quotation mark with \"

    Author at Zettelkasten.de • https://christiantietze.de/

  • I tried again searhing for \"Chapter , and also '\"Chapter but it doesnt work. Neither does searching for '\"
    Just searing for Chapter does work. See picture.

  • @jimmy92049 I see! Bad news: these are typographic opening and closing quotes; try searching for “Chapter.

    Since these are actually different characters in the file, they won't be found when searching for ".

    (That being said, I experimented with search that ignores such details, but it also matches e when searching for é and ë, and that's not a viable option in a lot of languages)

    Author at Zettelkasten.de • https://christiantietze.de/

  • thanks @ctietze . yes, I got to the same conclusion. The text is copied from Apple Books, and they use inverted citation marks at the beginning. So I copied the character from the text instead of entering it- not nice but it worked.

  • For things like that, I recommend a "cleaning" step to replace all typographically correct characters from publications with the raw ASCII symbols we usually type on our keyboards.

    This can also make later processing easier because some tools aren't smart enough to detect typographic quotation marks in all their flavors. In this case, including The Archive :)

    Author at Zettelkasten.de • https://christiantietze.de/

Sign In or Register to comment.