Is it possible to search for double-quotes in quoted text?

I’m working on a Scrivener project which may have double-quoted dialog that has embedded quotations that are also double-quoted. I need to find these and convert the double-quotes around the embedded quotations to single quotes. For example:

Joe slammed his cup on the table, shattering it. “That’s not acceptable! You told me “I’ll be in tomorrow” and now I have to wait another week?”

to:

Joe slammed his cup on the table, shattering it. “That’s not acceptable! You told me ‘I’ll be in tomorrow’ and now I have to wait another week?”

I think that’s almost impossible. You would need a regex that would find a double quote, some text, then another double quote that wasn’t the closing quote for that piece of dialogue. And there is the rub – how on earth do you define that? It entirely depends on context. In any case, I would wait to do formatting like that when you compile, and do it in a word processor – some of them have very good find and replace tools.

Oh, and by the way, technical questions are really supposed to go in the technical forum – this one is for passing on tips :slight_smile:.

Martin.

Link to the other post:

viewtopic.php?f=30&t=21764

In fact, I deleted this one and re-posted on technical forums yesterday. My apologies, but I’m not sure why it’s back here, though.

The new thread is here: viewtopic.php?f=30&t=21764

I included the technique and regex used to find the offending quotes.

So now it’s a tip! :slight_smile: