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

GREP to style text after right indent

Community Beginner ,
Oct 15, 2019 Oct 15, 2019

Hello, I'm still learning about using GREP styling in InDesign and have gotten stuck with this one. Within my paragraph style I'd like GREP to find a right indent and then style the text after it (which could be two words or 10+), until a paragraph break.

 

I tried this: (?<=~y)[\l\u]+

But it only styles one word after my right indent.

I thought if I used another positive lookbehind in relation to a paragraph break, that would help, but this isn't right either:

(?<=~y)[\l\u]+(?<=$)

 

Any help would be appreciated!

TOPICS
Scripting , Type
1.2K
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
Contributor ,
Oct 15, 2019 Oct 15, 2019

Hi,

the GREP styles each letter after the right indent until a space character occurs. So only the first word after the intent will by styled.

You can try adding a space character in the search

(?<=~y)[\l|\u| ]+

or search for every character

(?<=~y).+

 

Regards

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 Beginner ,
Oct 23, 2019 Oct 23, 2019

(?<=~y).+

Did the trick!

Thank you!

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 Beginner ,
Oct 20, 2019 Oct 20, 2019

If you're content is really predictable, you could go greedy and capture everything between a right indent tab and the paragraph break itself.

It's just ~y.+$

Not elegant by any stretch, but this gets the job done.

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 Beginner ,
Oct 23, 2019 Oct 23, 2019
LATEST

Oh that makes sense because it is very straight forward and predictable. Thank you!

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