I have a sequence of titles and description in my text following a pattern similar to
Data A: foo; Data B: bar; Data C: baz; Data D: qux
I want to bold just the titles, so I wrote the following GREP styles: ^[^:]*:
(from the beginning to :
, a string with no :
) and (?<=;\s)[^:]*:
(from the ;
excluded to :
, a string with no :
)
It works pretty fine:
Data A: foo; Data B: bar; Data C: baz; Data D: qux
If one of the descriptions includes a ;
, though, that GREP produces an unwanted result:
Data A: foo; bar; Data C: baz; Data D: qux
I tried removing ;
from the accepted pattern: (?<=;\s)[^(;\s):]*:
but it just skips the whole block, as if it checked the first ;
to the following :
, found that whatever was inside didn't match and started regexing again from after the colon:
Data A: foo; bar; Data C: baz; Data D: qux
How do I tell inDesign to start the GREP from the ;
closest to the next colon?
This, by the way, is the intended result:
Data A: foo; bar; Data C: baz; Data D: qux