Need a help with creating grep code

Learn / Forums / General InDesign Topics / Need a help with creating grep code

Tagged: 

Viewing 1 reply thread
  • Author
    Posts
    • #74184

      Hi,

      Thanks for checking my question.

      I do a regular Advertisement for a car company in indesign.
      There are about 200 to 300 listing like below every week.

      I need the below text converted to

      2015, MITSU ASX, INTENSE, 1.8 DSL, CRUISE -ALLOYS-SAT NAV-BLUETOOTH-280 TAX, RED, 27750

      2015(tab)MITSU ASX, INTENSE, 1.8 DSL, CRUISE -ALLOYS-SAT NAV-BLUETOOTH-280 TAX, RED(tab)27750

      the problem is Start year and last price will be different for each listing.

      I need a grep codes to do this task very quick

    • #74186
      Aaron Troia
      Participant

      Hey Francis,

      Try this, it should work for both as long as the comma and space between stay the same, they could also probably be split apart into two, but if it works why do it twice. This GREP only catches the comma-space at the beginning or at the end (it only see’s the numbers as reference using a lookahead and a keep), so the only thing you have to do is replace them with your tab.

      Find: (^\d+\K, |, (?=\d+$))
      Change: \t

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