Copy link to clipboard
Copied
Hello dear InDesign community.
Help me please to edit my GREP code to make text italic within single quotation marks with words that contains apostrophe. I have a problem that it stops working on the first apostrophe in a sentence. GREP sees it as the right quotation mark.
My GREP now is: ~[(.*?)~]
Thanks a lot.
Oksana
[Moved from the Lounge (which is where you can "connect with your peers" from across all of Adobe's products for conversations that don't directly relate to help and support) to a product-specific support forum by a moderator.]
I did
~[(.+?)~](?!\l)
and replaced with $1 (assuming you want to remove the quotes, of course...and maybe italicize them.
Copy link to clipboard
Copied
Maybe try a negative lookahead and see when it is NOT followed by a lower case character? Because a closing single quote would be followed by a space, whereas an apostrophe would be followed by a lower case character (I would think).
Copy link to clipboard
Copied
I did
~[(.+?)~](?!\l)
and replaced with $1 (assuming you want to remove the quotes, of course...and maybe italicize them.
Copy link to clipboard
Copied
Dear Erica, thanks a lot.
It works perfectly.
Copy link to clipboard
Copied
Excellent!
Copy link to clipboard
Copied