15 Replies Latest reply on Aug 2, 2016 2:09 PM by Peter Spier

    GREP Help


      I'm trying to use GREP to turn BC/AD into small caps in titles. The string I've used (  [\s\–]\K[AaBb][CcDd](?=[^0-9a-bA-B])  )

      works perfectly if the BC/AD appears in the middle of the title but not at the end, I tried to remedy this with this code [\s\–]\K[AaBb][CcDd](?=([^0-9a-bA-B]|\z)) but that then only works if the BC/AD appears at the end of the story (see images) which makes sense considering I'm saying not followed by any digit or letter or at the end of the story.


      I want an expression that finds BC/AD followed by any punctuation OR at the end of the story, is this possible in one style or should I use two?

      Screen Shot 2016-08-02 at 11.14.43.png

      Screen Shot 2016-08-02 at 11.17.09.png