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 – finding numbers and adding spaces

Return to Member Forum

  • Author
    Posts
    • #63005

      I have a document that consists of multiple tables. Each table starts with a column that has a 7-digit number. Ex: 9253409.

      I want to find that number and replace the formatting to 925 34 09.

      I have never jused GREP before, can anyone help me with the set up?

      Thanks!

    • #63007

      Search for this:

      b(ddd)(dd)(dd)b

      Replace with this:

      $1 $2 $3

      (note there are spaces in between!)

      The b codes incidate 'word boundaries', so 8 digit numbes will not be found. Each d matches a single decimal, and the parentheses group digits together for the correct replacement order.

      This will insert regular spaces; if you do not wish these numbers to be broken at the end of a line, you might want to use a Fixed Space instead. To insert a fixed space, use the code ~S (tilde, capital S) in the Replace With expression.

    • #63013

      Thank you, thank you, thank you! You just saved me several hours of work.

      I am forever grateful!

    • #63151
      jarda
      Member

      Hi could you please help me with GRAP in Indd?

      I have numbers in superscript and after this number I have space, than the text follows. I need to remove the space in between the number (in superscript) and the text. I am able to find it, but do not know what to put on the change field.

      1. option – In GREP I simply find super script – the problem is, the space is not in super script
      2. option – In GREP I put in find field d+ . There is space after the +, that you do not see on the pic. In this option, the problem is, it will search for all numbers, not only in superscript. (The space after the number is not in superscript).

      Could you please help me what to put to the GRAP change field? I don't know how to use the exact result of search, but delete the space!

      Example: 23 Hallo to 23Hallo. (23 is in superscript)

      Thank you very much,
      Sincerly,

      Jarda.

    • #63163

      GREP works great with plain text, but you cannot search for mixed attributes.

Viewing 4 reply threads
  • The forum ‘General InDesign Topics (CLOSED)’ is closed to new topics and replies.
Forum Ads