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

New to Grep can anyone help!

Return to Member Forum

  • Author
    Posts
    • #55323
      Anonymous
      Inactive

      I am formating a load of tables in indesign

      I have been supplied the time like this

      4:30am 8:30pm

      However it need to look like this

      4:30am – 8:30pm

      I would love to be able to change this with grep as I will have to put a dash inbetween about 3000 times!!!

      Thanks

    • #55324
      BoydE
      Participant

      Hi,

      I'm new to grep myself, but I think this will work:

      Find:

      (d+:d+am) (d+:d+pm)

      Change to:

      $1 ~= $2

      Don't forget to try it out a few times before committing the change to a live document.

    • #55325
      Anonymous
      Inactive

      THANKS YOUR A STAR!!!!

    • #55326
      Anonymous
      Inactive

      The problem with that is some times can be am or pm in either the first or second instance

      So this would work better I think

      (d+:d+ww) (d+:d+ww)

      That way the am and pm won't get mixed up

    • #55327
      Anonymous
      Inactive

      Worked a treat!!!! I owe you a Virtual Drink!

    • #55328
      Anonymous
      Inactive

      I just changed it 4 times changing the am pm

    • #55331
      Anonymous
      Inactive

      Is there anyway in indesign to replace text with an image with find and replace

      I have a vector graphic and want it to go everywhere there is a bit of text?

    • #55332

      Copy the image, then search for your text and replace with “contents of clipboard”. That's in the little menu to the right of the Change To field, “Other” category.

      It's available in both GREP and the regular sort of Text searching — if the search text allows it, using the regular text find is the easiest way.

    • #55333
      Anonymous
      Inactive

      This website Rocks!!! Thanks again!

    • #55335
      David Blatner
      Keymaster

      As Jongware wrote. Or read it here:

      https://creativepro.com/fin…..raphic.php

    • #55358
      Anonymous
      Inactive

      Hey thanks for all the great tips!!! I have another question I have my table in indesign and need to replace some text however the text is in brackets. eg:

      (Swim4life) when I replace this using the find and replace tool it only replaces the words inside the brackets ie: (logo) I then need to go through and delete the brackets I asume that there is some code I put on either end of the brackets but I have no idea what it could be.

      I have a Lynda account but could not find anything on any of your videos.

    • #55359
      Anonymous
      Inactive

      Don't worry I managed to do it this way [(] and replaced with a space then deleted the double space.

    • #55373

      That's … cumbersome. (It is! Honestly!)

      1. You might have used the regular search & replace. (Unless you did need one of the more advanced GREP-only functions to do more — you don't mention it, though, so I think you didn't need to.)

      2. The parentheses are 'special' inside GREP. They “mark” a group, and do not take part in the searching/replacing. This is an important feature of GREP — perhaps you replaced a few “Swim4life” without parentheses as well, as these will also have been found!

      3. Heh — and in the third round, you could also have used regular search & replace to remove those parentheses … You certainly didn't have to replace them with a space — you can also search for something and replace with nothing.

      The proper way to search for parentheses in a GREP expression is to un-make them special. As it happens, putting them inside square brackets is a way (and you could even have removed both open and close at once, using “[()]” — a sidenote), but the recommended way to search for a character that's normally “special” is to precede it with a backslash. That's the magic marker you were looking for. So

      (Swim4life)

      would have found only the phrases including their parentheses.

      (Edit because the lil' backslash gremlin ate my backslashes! I'll feed him a few more, just to humour him: and a 6th, for good measure: )

    • #55390
      Anonymous
      Inactive

      Thanks that worked a treat! doing it my way worked on document but then started going a bit crazy on the next one.

Viewing 13 reply threads
  • The forum ‘General InDesign Topics (CLOSED)’ is closed to new topics and replies.
Forum Ads