8 Replies Latest reply: Feb 23, 2013 8:59 PM by RobertKyle RSS

    Grep style: x words, maybe with punctuation

    RobertKyle Community Member

      I'm looking for a way to apply a character style when there's a dash within the first 6 words of the beginning of a paragraph. I've gotten this far:

       

      ^\w+(\s\w+){0,5}~_

       

      But it fails if there is any punctuation before the dash. This is for formatting datelines, so there will be commas and periods and hyphens. How can I count words in this messy language of ours?