I'm working on a book and I'm having an issue with GREP. I have a list of excercises in a following manner (to be clear - Zad. is a shortcut from 'Zadanie', meaning an 'Exercise' in English):
Zad.1 (main exercise)
Zad.1.2 (secondary exercise)
Zad.2 ... etc
Analogically, I have 2-digit numbers exercises: Zad.10, Zad.10.1, Zad. 10.2 etc. and 3 digit: Zad.100., Zad.100.1, Zad.100.2, Zad.101.
I would like to change "Zad." to a specific character style, only if it's followed by a secondary exercise. Wrote 3 greps:
But only first two are working properly. Any idea why the third one don't change the font?
Maybe I didn't understand your issue.
On your screenshot I see that all this cases are in Comic sans
I missed something?
I have a whole book made with a Lato font. I need to change prefixes: "Zad." to a specific character style (e.g. Comic Sans - it doesn't matter for now), only if they stand before secondary exercieses (x.1, x.2 etc). With the GREPs I sent above, it works only for one-digit and two-digit. In three-digit examples (see the screenshot) - it doesn't. The main exercise number is being changed to Comic. I need it to stay in Lato (as on two first screenshots). Any ideas for that?
Sorry maybe I posted my question wrongly.
However in your case you don't need 3 grep style.
One grep style is enough
Try this grep
or this one
Thank you for a help! Worked!
You have to insert "\" before any dot "."
the dot "." without "\" means any character
In your case for example your second grep style Zad.(?=\d\d.\d) means find Zad + any character with positiv lookahead any digit + any digit + any character
In this case your grep style finds Zad.108 too