4 Replies Latest reply on Dec 21, 2011 11:30 AM by Ken Krugh

    GREP to find string of quotes

    Ken Krugh Level 1

      I have some strange "strings" of quotes for which I need to search where there are consecutive single and double quotes with nothing between them. So "'"'Wording here.'"' More here."

       

      Can GREP be used to find a string of quotes that might consist of any number or combination of single and double quotes? The string would consist of either all open or all close quotes but could be any combination of double and single, starting or ending with double or single.

       

      Thanks,

      Ken

        • 1. Re: GREP to find string of quotes
          SJRiegel Adobe Community Professional & MVP

          try this

           

          ['"]+

           

          (that's a single and a double quote inside the brackets) If you do this with typographer's quotes turned on, and use the keyboard quotes in the find box, it will find open or closed quotes in any combination, and you can then change them to one instance. (Use the keyboard quote there as well, and with typographer's quotes turned on, it will change each the the appropriate one.

          • 2. Re: GREP to find string of quotes
            [Jongware] Most Valuable Participant

            SRiegel wrote:

             

            ['"]+

            (that's a single and a double quote inside the brackets) If you do this with typographer's quotes turned on [..]

             

            For the finding part, there is no need to toggle smart quotes off or on. For example, a single ' will find all three variants, whereas ~[ will only match curly open, ~] curly closed, and ~' only straight ones.

             

            Other than that, yeah, you want to make sure anyway Curly Quotes is active for the replacements.

            • 3. Re: GREP to find string of quotes
              SJRiegel Adobe Community Professional & MVP

              Jongware:

              Thank you for the clarification. I'm fairly new to GREP, and am using the GREP questions here to hone my skills. I'll be adding your info to my GREP reference files.

              1 person found this helpful
              • 4. Re: GREP to find string of quotes
                Ken Krugh Level 1

                Thanks a bunch guys, works perfectly!

                 

                Thanks for the heads up on the replacements and the smart quotes too.