Find/Change Grep only finds one instance per paragraph, where am I going wrong?

Learn / Forums / General InDesign Topics / Find/Change Grep only finds one instance per paragraph, where am I going wrong?

Viewing 1 reply thread
  • Author
    Posts
    • #72562
      Brendan Cain
      Member

      Hi,

      I’ve been using a Find/Change Grep to find any price with a comma and change that comma to a thin space (Newspaper’s editorial style).

      But the Grep only finds the first instance of this per paragraph.

      Sample text…

      “$200,000 $200,000 $200,000.

      text at start of paragraph $200,000

      $200,000 text at end of paragraph

      tab $200,000.”

      In the sample the grep would miss the second and third price on the first line.

      I’ve been using…

      Find…

      (?<=\$)(\d{3})\,?(\d{3})

      also tried (\$\d{3})\,?(\d{3})

      Change to…

      $1~<$2

      Is there anything I can add to find these last two prices?

      I’ve been using this in combination with Batch Find Replace script, so different greps are set up for 5,6 and 7 digit numbers that start with $.

      Thanks.

    • #72569
      Brendan Cain
      Member

      My question has been answered.
      Both the greps below work to find all prices.
      (?<=\x{0024})(\d{3})\,?(\d{3})
      (?<=[$])(\d{3}),?(\d{3})

Viewing 1 reply thread
  • You must be logged in to reply to this topic.
>