19 Replies Latest reply on Nov 19, 2012 8:15 AM by MadMac55

    Apply nested style up to one of several possible characters

    MadMac55 Level 1

      I d-i-d give this the old college try, but maybe I dont know the right place or I'm limited by Nested Style or by GREP style.

       

      I have any number of predictably unpredictable characters that I want to apply a CH style "up to"

       

      Example 1:  The InDesign Club of the Future Meeting, 3:30 pm:  Here is some sample text ....  Here is some sample text ....  Here is some sample text ....   — in this case, "up to" colon
      Example 2:  The InDesign Club of the Future Meeting, 3:30 pm - Here is some sample text ....  Here is some sample text ....  Here is some sample text ....   — in this case, "up to" space hyphen space

      Example 3:  The InDesign Club of the Future Meeting, 3:30 pm -- Here is some sample text ....  Here is some sample text ....  Here is some sample text ....   — in this case, "up to" space hyphen hyphen space

      Example 4:  The InDesign Club of the Future Meeting, 3:30 pm, Here is some sample text ....  Here is some sample text ....  Here is some sample text ....   — in this case, "up to" any character (comma) [of course, there's an argument in this one]

       

      There are 5-6 predictable samples.  But Nested Styles stacked on top of each other tends to bold the whole paragraph.  Would a js script be more applicable here or do you see GREP style working?  I have failed (even with my books on GREP) to nail any type of pattern down.