I'm really hard to get grep usage.. any tips on how I can achieve a character style using grep for this example (img):

Basically the structure is this: (start)paragraph(shift+enter) [characters I want to style] (en dash) [chars of paragraph style + (.) + (single space)+[digit I want to style)

a whole toc paragraph with charcter style grep for the red frames

I'm strugling with the greps for it. :/ any help ? Thanks in advance. []' :)


1 Answer 1


Ha ! Trying to clarify here when asking for help, ended up easying my mind on it.

I just solved it.

any characters between a forced line break and a en-dash:
GREP: (?<=\n).*(?=~=)

any number at the end of paragraph:
GREP: \d*\r

Well these were useful for my TOC styling. hope my dought help someone else. :)

  • You could also do at least the first one with a nested style; that would be less processor-intensive if your TOC grows very long. Actually, you should be able to do all of them as nested styles if digits are available in the dropdown menu there… can't remember offhand if they are. Nov 14, 2015 at 9:41
  • I will try that, in the next book, thanks Janus ✌ Apr 13, 2016 at 16:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.