3 Replies Latest reply on May 14, 2015 3:05 AM by scs38088219

    GREP for numbers after using Live Caption




      I am placing image material with live captions in indesign. The file name created usually goes like this:

      Credit: 0617 name.jpg


      I would like to remove the date (0617) as well as .jpg automatically. I can do the later with a text search function, however,

      due to different dates I can't do the same there.


      My Grep codes (\d+) do not seem to find any numbers in the image captions. The captions are static by then.



      Any ideas what could go wrong there?




        • 1. Re: GREP for numbers after using Live Caption
          jsligh Level 1

          Live captions, section markers, and other variables or treated like a single character.


          You say, "The captions are static by then".

          Static Captions—These would be treated as normal text and your expressions should work fine.

          Live Captions—These will automatically update based on the filename of the associated linked media. As mentioned before, they are treated as a single character.


          Grep Style



          Description of Expression

          (:\s\K\d+\s|\.\l+$) Find a one or more digits and a whitespace character that follows

          (:\s\K\d+\s|\.\l+$) That comes after a colon followed by a whitespace character

          (:\s\K\d+\s|\.\l+$) Or

          (:\s\K\d+\s|\.\l+$) Find a period followed by one or more letters, which come at the end of a paragraph


          Character Style used by above expression to hide the found characters

          • Basic Character Formats
            • Size = 1pt
          • Advanced Character Formats
            • Horizontal Scale = 1%
            • Vertical Scale = 1%
          • Character Color
            • None



          1. Set up the aforementioned grep style in your caption paragraph style, as well as the associated character style.
          2. Generate Static Captions for your photos Object > Captions > Generate Static Captions


          If you frequently use this layout, you may consider setting the caption options to place the captions on their own layer. This way you can easily remove all at once and regenerate static captions.

          • 2. Re: GREP for numbers after using Live Caption
            Willi Adelberger Most Valuable Participant

            For your purpose I would not use LIVE captions, only static ones which allows to change text with all known tools.

            • 3. Re: GREP for numbers after using Live Caption
              scs38088219 Level 1

              You are the best, thank you so much for your help!