Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
5

New and need help with GREP style

New Here ,
Sep 22, 2023 Sep 22, 2023

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!

TOPICS
How to , Scripting
142
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 22, 2023 Sep 22, 2023

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 22, 2023 Sep 22, 2023
LATEST

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines