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

Change style with GREP inside a paragraph style

Community Beginner ,
Jun 09, 2022 Jun 09, 2022

Copy link to clipboard

Copied

Hello to all

I have a bilingual line in my document, something like

Presentation  |  Apresentacao

Inside a paragraph style, I created a GREP to apply a Character style from the "|" character on.

\x{007C}.+$

How could I changed it to apply this character format only AFTER the "|" character? I don't want include the | in the character style.

 

Thanks in advance

Rita

TOPICS
How to

Views

283

Translate

Translate

Report

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

correct answers 2 Correct answers

Community Expert , Jun 09, 2022 Jun 09, 2022

It would be easier to use nested styles.

Capture d’écran 2022-06-09 à 23.51.16.jpg

 

Capture d’écran 2022-06-09 à 23.50.41.jpg

Votes

Translate

Translate
Community Beginner , Jun 09, 2022 Jun 09, 2022

I joined your solution to mine and the following expression worked out:

(?<=\|).+$

Thak you all

Votes

Translate

Translate
Community Expert ,
Jun 09, 2022 Jun 09, 2022

Copy link to clipboard

Copied

It would be easier to use nested styles.

Capture d’écran 2022-06-09 à 23.51.16.jpg

 

Capture d’écran 2022-06-09 à 23.50.41.jpg

Votes

Translate

Translate

Report

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 Beginner ,
Jun 09, 2022 Jun 09, 2022

Copy link to clipboard

Copied

I used nested styles elsewhere, but here, sometimes I have 1 word, sometimes uo to 3 before the |

Votes

Translate

Translate

Report

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 ,
Jun 09, 2022 Jun 09, 2022

Copy link to clipboard

Copied

It does not matter, the trigger to apply the character style is the |, not a number of words.

Votes

Translate

Translate

Report

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 Beginner ,
Jun 12, 2022 Jun 12, 2022

Copy link to clipboard

Copied

ok, I see it now. Thank you so much!

Votes

Translate

Translate

Report

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 ,
Jun 09, 2022 Jun 09, 2022

Copy link to clipboard

Copied

(?<=\|) \w+

This grep will find "1 space" and "word" after "|"

 

Votes

Translate

Translate

Report

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 Beginner ,
Jun 09, 2022 Jun 09, 2022

Copy link to clipboard

Copied

I joined your solution to mine and the following expression worked out:

(?<=\|).+$

Thak you all

Votes

Translate

Translate

Report

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 ,
Jun 10, 2022 Jun 10, 2022

Copy link to clipboard

Copied

(?<=\|).+$

This expression will find everything after "|" up to the end of paragraph.

If your situation is just:

English | Spanish^p

your expression works.

Votes

Translate

Translate

Report

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 ,
Jun 12, 2022 Jun 12, 2022

Copy link to clipboard

Copied

LATEST

Be aware that GREPs make InDesign slower, nested styles are faster.

Votes

Translate

Translate

Report

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