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.
^.*?(,|$)
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})