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

Format numbers using GREP

Return to Member Forum

  • Author
    Posts
    • #115997
      Anonymous
      Inactive

      Hi, is there any way to format numbers and use it in a paragraph style using GREP?

      I have an tab separated text (from Excel) file with numbers looking like 1234567890. In Indesign I will use this file to generate barcodes, one for each page in the output file.

      But, I want the numbers to be formatted as 123 456 78 90. I tried to use search/replace with GREP and i worked fine, my search looks like:
      Search: (\d\d\d)(\d\d\d)(\d\d)(\d\d) Replace: $1 $2 $3 $4 , the result is exactly like I want it to be. But how do I apply the GREP search to a Paragraph style when generating codes?

      Best;
      Henrik Robertsson – Not so smart Indesign user… :)

    • #115998

      Find-Change is not possible as part of a paragraph style. GREP within a paragraph style only works as embedded character style.

    • #116005
      Anonymous
      Inactive

      Thanks for the swift reply. OK, so it’s not possible then.
      Then I will fix it in Excel before generation in Indesign.

    • #116007

      Do you really need ‘true’ spaces? Otherwise you can make it look like spaces with a character style that applies some character distance.

    • #116008
      Anonymous
      Inactive

      No, not really, just for show works as well. Do you have an example of using a character style to solve this?

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