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

Search Text, Replace With Charactor Style

Return to Member Forum

  • Author
    Posts
    • #64587
      Mark Gilvey
      Member

      I’m trying to do a search for text that is surrounded by brackets like this: [0:21] and I want to style this. The numbers vary but the brackets don’t. I found the GREP page with codes but I don’t know how to enter them. I did a search and replace, clicked GREP and then into one of the two large boxes at the bottom but it opens a window, can’t enter the code so I can attempt at adjusting it. I’ll stop there.

    • #64595
      Hopsa Rijnen
      Member

      In the pop-up window you enter your character style. Or actually choose it from the pop-up that comes up directly in that window (e.g. characterstyle) if you made a characrter style in the first place.

      In the Find panel you enter, in the fields above, the correct GREP. (in the GREP tab)
      Like so \[\d+\:\d+\]

      good luck, if there’s a komma (,) or some other punctiuation between those numbers let us know, than we’ll alter the grep code

      • #64598
        Masood Ahmad
        Participant

        Mark, in addition to Hopsa, please try this if you do not want to include the brackets []

        (?<=\[)\d+\:\d+(?=\])

        This will work both ways i.e. either with Find/Replace command or with Paragraph/GREP styles.

      • #64648
        Mark Gilvey
        Member

        Hopsa, it worked perfectly! I started going through David Blatner’s tutorial as well to reduce some of the fear factor I have with this but your code worked and saved me almost 4000 instances of manual changes I would have had to make.

    • #64649

      Mark that’s so excellent! Great news.

      FWIW I wrote a post on this exact type of grep find/change a couple years ago, you might find it useful.

      https://creativepro.com/findbetween-a-useful-grep-string.php

    • #64770
      Mark Gilvey
      Member

      Thanks Anne-Marie! Been going through your ePub tutorials on Lynda. I learned something else today, I think InDesign doesn’t like to do spell check and wants you to do it before you bring the content in. I have a 460 page doc and it took 2 hours to get through 60 pages! I’ve reduced image quality preview, turned off previews on pages palette and shut off preflight settings and it takes for ever. I have 16gb of RAM as well and nothing else running. Oye!

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