GREP to move text to end of parahraph

Learn / Forums / General InDesign Topics / GREP to move text to end of parahraph

Viewing 3 reply threads
  • Author
    Posts
    • #101497

      Hey all,

      I have a weird problem i’m trying to work around.

      I have a bunch of products with dates on them that need to be moved to the end of a line. (e.g. 08-12 product name –> product name 08-12).

      I can find the dates with a GREP input like this (\d\d[-]\d\d) and its accurate enough, and finding the end of a paragraph is not a problem, but I can’t seem to make them work together so I can separate them.

      basically I want to be able to put into the replace field “$2 $1” to get what i need, but I’m still really new to GREP. I’m not sure what steps I’m missing to get to this point.

      Thanks for any help,

      Cam H

    • #101498
      David Blatner
      Keymaster

      I think you need to put each part in parentheses… for example, (\d\d-\d\d) (.+)
      Then $2 will refer to the 2nd part, and $1 refers to the first part.

    • #14324029
      Ian Martinez
      Member

      Hey Guys,

      I the same problem but cant seem to make it work, i need the following

      123 product name —> product name 123
      123 product name —> product name 123

      i guess its easier since its just numbers, David said something about separate in parentheses

      Any help would mean a lot since we are talking about 5000+ products.

      thanks in advance

    • #14324028
      Ian Martinez
      Member

      Nevermind guys

      Read a little more careful what you guys said and made work with

      Find: (\d+)(.+)
      Replace $2 $1

      Thanks

Viewing 3 reply threads
  • You must be logged in to reply to this topic.
>