2 Replies Latest reply on Nov 7, 2013 10:44 AM by pixxxel schubser

    CS6 GREP apply nested style to all characters before first instance of string, excluding that string

    maguskrool Level 1

      Hello.

       

      I'm formatting a bibliographic list for an article and all entries are formatted more or less like this:

       

      SMITH, P., JONES, L. 2009. etc.

       

      I need to apply a character style to everything that comes before the year, like this:

       

      SMITH, P., JONES, L. 2009. etc.

       

      I found a GREP expression that allows me to find everything up to the first digit, but it includes said digit, so I end up with this:

       

      SMITH, P., JONES, L. 2009. etc.

       

      That expression is ^.*?(. \d|$)

       

      Can anyone help me tweak this, or find some other solution to achieve what I need? Thank you.