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

Swapping order of words with GREP

Tagged: , ,

Return to Member Forum

  • Author
    Posts
    • #77876
      Adam Byrne
      Member

      Hey guys,

      I have 1,500 photos that need to be inserted into an InDesign document and each need to have the name’s below the photo. This part is easy as it’s just a simple data merge. Where I’m having difficulty is that I have been supplied the names incorrectly. For example I would need it to appear ‘John Smith’ but I have been supplied the text as ‘Smith John’.
      Is there any GREP command that can select the first word of each paragraph up until the space and then send it to the end of the paragraph?
      If there is it is going to save me a days work!

      Thanks in advance :)

      Cheers,
      Adam

    • #77881
      Anonymous
      Inactive

      What about this :

      F : (\w+) +(\w+)
      R : $2 $1

      ?

      Otherwise you could think of a script to rename the files accordingly prior to data merging.

      FWIW,

      Loic

      Accueil

    • #77883
      David Blatner
      Keymaster

      Also note that I discussed this same process in my video title on Data Merge at lynda.com

    • #77917
      Adam Byrne
      Member

      Awesome! Thanks guys. Just saved me a tonne of work.
      Really appreciate the help! :)

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