2 Replies Latest reply on Aug 27, 2014 1:58 PM by Peter Spier

    Reference custom Paragraph Style within GREP


      I'm wondering if someone can help. I have updated some formatting and decided to use Small Caps style, but making sure all character are lowercase.


      Does anyone know how to create a GREP that targets a custom paragraph style called "Header One" and returns any uppercase characters to lowercase? (while keeping the Small Caps intact)


      Any help or suggestions would be appreciated.

        • 1. Re: Reference custom Paragraph Style within GREP
          Willi Adelberger Most Valuable Participant

          It cannot be done with GREP style.

          It can be done with a text variable like running header.

          • 2. Re: Reference custom Paragraph Style within GREP
            Peter Spier Most Valuable Participant (Moderator)

            I don't believe he asked for a GREP Style...


            The following will work in many cases for Find/Change: (?<![\r\.\!\?])[^\r\.\!\?]+

            I've made the presumption that you don't want to uncapitalize the first work in a sentence, so the expression finds everything that is not a paragraph return, period, exclamation mark or question mark and that does not have one of those in front of it. It fails with the first sentence in a story (which has nothing in front of it), and for quotation marks which might or might not end a sentence, so I left them out, and for proper names and initials.


            I think you would need to run it twice -- once to change the case to normal, once to apply the small caps. I can't think of a way to do it in one step, but I'm not quite as clever with GREP as some of the others, so we may get an education if we wait.