Hello, I’m new to GREP and can’t seem to wrap my head around how to use REPLACE with GREP (no style change/application needed in this case) + how to get a location GREP to work in addition to two other GREPs.
I import Word manuscripts for books into InDesign on a regular basis and I’m hoping to simplify the process of correcting quotation marks with GREP. People often use straight quotation marks in their Word documents, and I need double left and double right quotation marks instead («»).
1. For the purpose of replacing to double RIGHT quotation marks I have this code to find every instance of a double STRAIGHT quotation mark before any kind of punctuation or at the end of a word, and it seems to work fine:
(~”[[:punct:]]|~”)
However, I can’t figure out how to turn this into what I want with REPLACE. I need to retain the different kinds of punctuation throughout but change the STRAIGHT double quotation marks into the correct double RIGHT quotation marks. How do I type this out in the REPLACE field?
2. For the purpose of replacing to double LEFT quotation marks I have this code to find every instance of a double STRAIGHT quotation mark after an open parentheses or any kind of white space:
(\(~”|~”)
But I also need to include finding instances of double straight quotation marks at the beginning of a paragraph, and as soon as I include this in the GREP, it no longer finds the instances after any kind of white space (located within a paragraph).
(\(~»|~»|^~”)
It seems the location GREP applies to the other two GREPs, but I need all three of them to work simultaneously. How can I accomplish that?
Beforehand, thank you so much for your help!
Best regards, Elisabeth, Norway