The GREP for this would be:
1. Start of paragraph: ^
2. Followed by a single letter "l": l
3. A positive lookahead for a single space: (?= )
Great, it did work!
Could you even tell me how to find all characters first in a paragraph UP TO the colon (:) ?
I would like to style
New York: bold, but not the rest of the paragraph.
^[\l\u\d.]+: Will find New York: if it is in the start of a paragraph.
Finding all text up to a colon at the beginning of a paragraph is probably better handled by adding an ordinary Nested Style to your paragraph style...
Really? What if you do not have a colon every time.
That's a different question. GREP isn't going to solve that either without a trigger of some sort.
But in this case the question was how to make all the characters up to a colon bold, and the most efficient way to do that is with a nested style, not with GREP.
correct, but with grep you can use it on a style not only used with this format first in the paragraph.
But that was not what was requested, and it has the potential to style text in undesired ways.
GREP styles are extremely powerful for matching "random" types of text that needs to be styled, but they slow down the program, and the slowdown can be significant it you have a lot of them, so they are never the recommended solution if there is a more direct method.