Back

If your email is not recognized and you believe it should be, please contact us.

  • You must be logged in to reply to this topic.Login

GREP – how to 'add' a set of characters at the end of a set of digits??

Return to Member Forum

  • Author
    Posts
    • #62109
      DesignGirl
      Participant

      Hi,

      I am trying to 'add' or 'insert' a group of characters at the end of a set of digits. I can find the set of digits but cannot 'insert' the set at the end.

      ie: find the price $xxx and insert the word 'RRP' at the end of the price (digits)

      I want to set this up in the grep for the character/paragraph style so when we input the price the RRP inserts itself with the styling on the end.

      Thanks :)

    • #62114

      GREP styles cannot add text.

    • #62115
      DesignGirl
      Participant

      ) I guess with grepping it needs something to replace? I guess an object style would not be ideal as i would like to keep it all as text and not have the RRP split off into another text box within the price box. Thanks thoug. appreciate any other thoughts to get around this.. hmm maybe a script?

    • #62116

      Well, all a script could do is a simple find-and-replace, and you might as well do that right away. Store your change, so you can recall it again next time.

      Object styles also cannot add text, so that's also a dead end.

    • #62245
      DesignGirl
      Participant

      HI , thanks for that.. i have another query maybe you could help me with :)

      In GREP, not find and change (because this is set as a paragraph style, one click and it should style the supplied copy) how do i find 'bold' characters/words/digits? the copy supplied what is in bold has a different styling to the rest of the copy?

      Thanks :)

    • #62247

      GREP styles cannot react on formatting, only on text.

      If you want to change the formatting of already formatted text to something else, you either have to change the character style that is applied to it, or use a regular find/change.

    • #62251
      David Goodrich
      Participant

      Young grasshopper, the master has spoken true words: you must follow his clues and understand GREP's essence (hint: Regular Expressions are text, not attributes).

      As it is written, InDesign styles cannot add text, not even GREP styles; however, find/change, including its GREP incarnation, can perform this feat; find/change searches can also be saved for re-use, and you can even add text from the clipboard, preserving formatting or not as you choose.

      The “one-click” way to style copy is to put the cursor in a paragraph (or select all) and then Alt-Click on the desired Paragraph style's name. However, this forceful method may produce unintended consequences. Often it is better to fix copy that is supplied incorrectly. Here, too, the master has spoken.

Viewing 6 reply threads
  • You must be logged in to reply to this topic.
Forum Ads