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?