6 Replies Latest reply on May 10, 2017 7:21 AM by Woodsie Maggie

    Search for missing closing parentheses

    Woodsie Maggie Level 1


      I have  been trying to figure out how to search for missing closing parentheses in an InDesign CS6 document.   I found some potential helpful and interesting scripts at a website InDesign GREP Searches - Scribe  but for the life of me I cannot find the download for this.  Does anyone know how to do this particular search, or are familiar with this script link and knows how to access it?  I am assuming it would be a GREP search.  Unfortunately, many of the script sites are, well, not for a laymen like myself, and I do not want to mess anything up.  I appreciate your time interest in helping a novice like myself.

      Thank you,

      Maggie Barr

        • 1. Re: Search for missing closing parentheses
          Erica Gamet Adobe Community Professional

          So you're looking for text that contains an open paren, but the closing one never exists? We should be able to find text that has that pattern with GREP, but no way to automatically insert the closing paren in the text. Unless the enclosed text is consistent.


          Can you give me a screenshot of what you have and what you need to accomplish?

          • 2. Re: Search for missing closing parentheses
            Woodsie Maggie Level 1

            It is not a screenshot, but I have a book with a lot of information, and in a few of the chapters I have found some missing parentheses.  The examples below will show you.  I did in one instance find a missing open parentheses, but I am hoping that I could modify the search for the missing closing to search for the open.  I do not need it to put them in, only find them and I can fix it manually as there are not many.

            Thank you so much for your time and interest in helping.

            Best Wishes,

            Maggie Barr


            Lepthyphantes leprosus (Ohlert

            Other Name(s): Lephthyphantes leprosa (Ohlert)

            Locations: Bass Harbor, one female (21 August; Britcher).




            * No specimens found.


            Callobius bennetti (Blackwall

            Other Name(s): Amaurobius bennetti (Blackwall)

            Locations: Station: F190 (Eagle Lake to Bubble Brook, 2 June 1935), one female; Corfield; Bass Harbor; Hulls Cove; Penikese; Great Heath; Newport Mountain, opposite of; Reservoir Road; Morrell Park; Toad Hole, young female, meat trap (1 September 1935);  Bass Harbor, females with egg sacs (24 July 1902; Britcher).

            Abundance: Mature females common from June to August; males not taken but appear in early spring.

            Notes: Under bark on stumps and under logs and stones in woods; Young frequent in sifting; One female on rotten wood (30 May 1931).


            * Amaurobius bennettii; Collector: Procter, W. H.; Collection Date: 07 July 1926–30 August 1932 (Approximate); Collection #: 67; Collection Location: Mount Desert Island; Catalog #: ACAD 33132.


            Clubiona moesta Banks)

            Other Name(s): Clubiona emertoni Petrunkevitch

            Locations: Station: F172 (Corfield, 31 July 1934), one female; Robinson Mountain, one male (24 August 1934).


            Notes: Beating pine (20 August 1944).


            * No specimens found.

            1 person found this helpful
            • 3. Re: Search for missing closing parentheses
              Obi-wan Kenobi Level 5



              I let Erica Gamet finish! … 


              In your sample:

              1 regex to find the "good-parenthesis" entities!

              1 regex to isolate the bad ones! … Easy when we've already found the good ones! 


              Capture d’écran 2017-05-09 à 15.58.24.png



              1 person found this helpful
              • 4. Re: Search for missing closing parentheses
                Woodsie Maggie Level 1

                Obi-wan Kenobi

                I am sorry that I do not understand what you have written.  Highlighting good vs. bad is one way; However, even that way you show I was unable to figure out without the steps.  I have a 600+ page document, so if I can find a way to search for an opening parentheses with a string of text and no closing parentheses, then I can simply go into the document as they are found to change them manually when they are pointed out to me, and in the end they will have all been fixed and none will come up in the search.  Can you clarify how you did this?

                Again, I apologize for not knowing more about how the program works.

                Thank you,


                • 5. Re: Search for missing closing parentheses
                  camilo umana Level 1



                  Obi is solving (perhaps in the finest solution) your problem (partially)


                  He proposes isolate the wright parentheses, that means detect those that open and close: green colour.

                  (For this you may find regex in the web that locates them...)


                  Later, you may find those who are single... This regex, wrote by Obi in a forum here, may be useful:




                  and you apply a colour (red, for example)...


                  This regex may be change, perhaps, test it:




                  But your problem is really serious. You lost information (how?) and nobody can help you to find invisible and uncertain parentheses: sometimes they thread one word, sometimes more: no way to detect them...  That is ontological to resolve.


                  Obi proposes check the «incomplete» parentheses and with the help of yourself or another fellow reconstruct the original text.

                  1 person found this helpful
                  • 6. Re: Search for missing closing parentheses
                    Woodsie Maggie Level 1

                    Thank you to those that posted trying to help,

                    This was a dataset that I exported to word from Excel and then put in InDesign.  It was an error in the excel file and not a problem with losing information in InDesign.  I actually used Obi’s concept, went back to the excel file and copied the columns of information with the error twice, searched one column for a right Parentheses, highlighted them all in the view finder and applied a color to the cells.  I did the same on the second column looking for a left parentheses and highlighted them another color.  Sorted the first column by color, and then scanned through the data, and any with no color in the second column had the error so I could fix it there and go to InDesign, search the species name and fix it in the document.   I actually use the place command in InDesign quite often to get excel files into InDesign so I can used the advanced find and replace or GREP to make modifications in the data that otherwise would be torturous to do in Excel, and then I just copy and paste the corrected data back to excel.  When I have more time in the future I will try to learn more about the process described here using the regex method.  Thank you all for your help!


                    1 person found this helpful