Skip to main content
Participant
September 22, 2023
Question

New and need help with GREP style

  • September 22, 2023
  • 2 replies
  • 155 views

Hello, newbie here trying to figure out how to write a GREP code so that all text after a comma and before a hard return is italics. 
Found this:

(?<=,\s).*?(?=;)

,which almost works, but not sure what to use at end for hard return vs. semicolon -- and if possible? Thanks for any advice!

This topic has been closed for replies.

2 replies

Peter Spier
Community Expert
Community Expert
September 22, 2023

Presuming this is the first comma in your paragraph you don't need a GREP style. An ordinary nested style is more efficient.

Set [None] theough 1 comma (,), then set your new character style through something that will not appear in the paragraph, such as an End Nested Style Character. Since the character doesn't appear, the style will run to the end of the paragraph.

Participant
September 22, 2023

Please ignore, just found a code that seems to be working!