6 Replies Latest reply on Aug 20, 2011 1:42 PM by Cayce

    Help with WildCard Find & Replace

    Cayce Level 1

      I've got a tricky situation on my hands that I've tried about everything I can imagine but can find a solution for.

       

      I have a manuscript hundreds of pages long. Throughout this manuscript are lines like this one, all beginning with "26" and ending with a carriage return:

       

      26 Saturday Weekday [34]; BVM on Saturday

       

      There are a lot of these and I need to put a carat character (^) after the carriage return on each one so that it looks like this:

       

      26 Saturday Weekday [34]; BVM on Saturday ^

       

      The problem is, the text between the "26" and ending carriage return is different in each case. I don't know the WildCard string required to get the Find & Replace to ignore all the data after the "26".

       

      What I'm needing is something to the effect of:

      FIND: 26[WildCard String]

      REPLACE: 26[WildCard String]^

       

      Leaving all the original varied text in the [WildCard String] area as it originally was. Is this possible or is there a more sensible way?

       

      Using CS5 InDesign.

       

      Thanks.

       

      Cayce

        • 1. Re: Help with WildCard Find & Replace
          Peter Spier Most Valuable Participant (Moderator)

          Maybe, but first I'm confused. Are those pilcrow glyphs that show, or non-printing characters that you've made visible? You can't add text to a paragraph after the paragraph break character at the end -- that would be the next paragraph.

          • 2. Re: Help with WildCard Find & Replace
            Cayce Level 1

            Actually that's true: the carat character acts as a delimiter so that everything after that character is a new row in a 'Convert Text to Table' process, so it actually is starting a new paragraph, in a sense. It's intended to fall after the paragraph marker (/r or ^p, technically speaking?).

            • 3. Re: Help with WildCard Find & Replace
              Peter Spier Most Valuable Participant (Moderator)

              You didn't really answer the question, and I don't think youu necessarily understood the implication of what I said. You can't insert any character after the end paragraph symbol and have it in the same paragraph.

               

              By definition the end paragraph symbol (non-printing) is the last thing in a paragraph and anything you try to insert after it will be added to the start of the next paragraph. That's why I want to know if those pilcrows you are showing are printing glyphs, or non-printing end of paragraph markers. That make the differnce here between doable and not.

              • 4. Re: Help with WildCard Find & Replace
                Cayce Level 1

                Ok... learning new terminology. The pilcrows don't print. I only inserted them to show the paragraph structure. When I do the actual find & replace, the FIND will most likely look more like this:

                 

                ^p^p26 [WildCard String]^p

                 

                if i do it as a text... or

                 

                \r\r26 Saturday Weekday [34]; BVM on Saturday\r

                 

                if done as a grep. I'm not clear which is best.

                 

                At any rate, the original text looks like this:

                 

                26 Saturday Weekday [34]; BVM on Saturday

                • With EP I of the First Sunday of Advent the new.....

                 

                and I need the resulting text to look like this:

                 

                26 Saturday Weekday [34]; BVM on Saturday

                ^

                • With EP I of the First Sunday of Advent the new.....

                 

                or

                 

                26 Saturday Weekday [34]; BVM on Saturday^

                • With EP I of the First Sunday of Advent the new.....

                 

                or

                 

                26 Saturday Weekday [34]; BVM on Saturday

                ^• With EP I of the First Sunday of Advent the new.....

                 

                Doesn't really matter as long as the carat character stands as a delimiter between the first and second lines. And as I mentioned, the problem is that in each instance, the text following '26' in each instance is different, so that's the wildcard area I don't know how to manage.

                 

                I apollogize if I'm being unclear... been at this for going on 10 hours now and probably need a break.

                 

                Thanks for your help.

                • 5. Re: Help with WildCard Find & Replace
                  Peter Spier Most Valuable Participant (Moderator)

                  OK, now I know what you want.

                   

                  Find .$

                   

                  and Replace with $0^

                   

                  will put a ^ at the end of any NON-empy paragraph. Whitespace is not non-empty.

                   

                  You could get fancier with looking for consecutive empty paragraphs, but this should work, according to your description.

                  • 6. Re: Help with WildCard Find & Replace
                    Cayce Level 1

                    Thanks, Peter.... I'm going to try that but have to take a break... hopefully you'll be around when I can get to it.

                     

                    Thanks so much.

                     

                    Cayce