Replace quotation marks using regular expressions

Please can anyone help with a regular expression to replace quotation marks only but not the quote itself?

The goal is to use Find and Replace to change the "marks to ’ in quite a few places. I’m guessing this isn’t too easy :\ :slight_smile:

Thank you for reading this.

A sample file is needed. In most texts simple quotation marks have been replaced (Autocorrect) by leading and tailing ones. So you have to insert (clipboard) for SEARCH probably both of them (SEARCH&REPLACE tool).

The substituted single quotation marks should be simple ones or should they be leading and tailing ones?

@Backintimeplease You have to give more details.

EDIT
I altered the given topic (Regular expressions) to:

Replace quotation marks using regular expressions

Do you have pairs of typographical quotation marks like “text” or are this all straight double quotes?

Thank you for editing the title, thank you everyone who has replied.

Sadly you didn’t reply to our question. Anyway: I use the following to search for Text in curly braces:

\{(.*?)\}

I have to use \ before the braces, because they have a special meaning in regular expressions, this makes them searchable.
The round paranthesis ( ) result is the found text to be stored internally, so I can refer to it during replace.
.
I could use XX$1XX to replace {my text} with XXmy textXX (Actually I use the pattern to replace the style/formatting, but this is another topic.)
.
The ? is necessary, if I have several places in one paragraph to replace like in

{my text} some other text {my second text} wich would be found as

{my text} some other text {my second text} without the ?
.
Use this as starting point and if you only have straigt double quotes check, if there are consecutive pairs, as often in .csv-files. Treat this first then… and keep a backup of your original source.

"Text","Pete said ""Hi""",0,"","Good luck !"

1 Like