Help with Grep Find Change

Learn / Forums / InDesign User Groups / Help with Grep Find Change

Viewing 7 reply threads
  • Author
    Posts
    • #101542

      Hello

      I need to locate headlines that are formated with the attribute Bold, and apply a character style to them. So far so good. The problem is that inside the general (running) text there are also bold formated characters. How do i grep it so that it will locate only the headlines? I tried to use the “beginning of paragraph” option under “location” but it didn’t work..

      Please Help :)
      Shirly

    • #101543

      Hi,

      What do you call “headline”?

    • #101544
      David Blatner
      Keymaster

      You could do a grep search for ^.+$ and set it to search for bold formatting. That would find paragraphs in which ALL the text in the paragraph is bold.

    • #101549

      Thanx David. I tried it but it turned all of my text to bold…
      When i say “headlines” i ment this:
      chapter name
      jhd zdhfb dkfgb dkfjv zxmvjzmxv zmvz vjnvc
      jhdbfkbd sdkfjnsdmfn,fskjdfn

      chapter name
      jsdhfsd fkg fdkjgnd fghkjndfg skfjgn
      kjbf dkjbdsgmbsdg sdkg

      the chapter names are bold formated and i want to find them all and apply a character style.
      the problem is that i have words inside the body text that are also bold formated so it “catches” them to..

      hope i was clearer now :)

    • #101551

      Find: (?s)^.+
      Replace by: [nothing]
      Find Format: +Bold
      Replace format: Your_Para_Style

      … Personal view: by security, I would run before: .+ & condition

    • #101552

      Thank you so much Michel – It worked!!!

      Can you please explain to me what every part of this grep means?
      I know that ^ means beginning of paragraph. what do the others stand for?

    • #101594
      Graham Park
      Member

      (?s) Single Line On
      ^ Beginning of Paragraph
      . Find any character
      + Repeat zero or more time

    • #101623

      Thank you Graham!

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