Copy link to clipboard
Copied
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!
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
(?<=~y).+
Did the trick!
Thank you!
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Oh that makes sense because it is very straight forward and predictable. Thank you!
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more