Couldn't exactly find the answer in other threads. Here's what I'm trying to accomplish:

In the below example I want to apply a GREP style by finding only the title of the artwork. In this case, only the information before the comma on the first line.

My Beautiful Painting #3, 1999.
Oil on canvas
25 x 25cm
Gift of the artist.

I think this needs to be done via the "positive lookbehind" match function, but I can't seem to figure out the syntax.

  • Welcome to GraphicDesign! What have you tried? You're more likely to get a good answer if you show more effort Commented Jan 25, 2015 at 22:32
  • ^.*?(,|$) works for everything up to (and, unfortunately, including the comma). I only want it to run on the first line. This is why I want to use the lookbehind function – just struggling with getting results. So far this is what seemed to make sense to me .(?=,\s\d{4})
    – roeleveld
    Commented Jan 25, 2015 at 22:53
  • 1
    If your question is solved with that you could post it in more detail as an answer below to help others :) Commented Jan 25, 2015 at 23:09

1 Answer 1


I think I figured it out. Should have been using positive lookahead, not lookbehind. .+(?=,\s\d{4}). This article was helpful carijansen.com/2013/03/03/positive-lookahead-grep-for-designers

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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