Help with Grep Find Change
Learn / Forums / InDesign User Groups / Help with Grep Find Change
Tagged: Find Change Grep
- This topic has 7 replies, 4 voices, and was last updated 6 years, 2 months ago by Shirly Oshrat Pasternak.
-
AuthorPosts
-
-
February 7, 2018 at 3:13 pm #101542Shirly Oshrat PasternakMember
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 -
February 7, 2018 at 3:32 pm #101543Michel Allio for FRIdNGEParticipant
Hi,
What do you call “headline”?
-
February 7, 2018 at 5:07 pm #101544David BlatnerKeymaster
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. -
February 7, 2018 at 11:30 pm #101549Shirly Oshrat PasternakMember
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,fskjdfnchapter name
jsdhfsd fkg fdkjgnd fghkjndfg skfjgn
kjbf dkjbdsgmbsdg sdkgthe 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 :)
-
February 8, 2018 at 3:28 am #101551Michel Allio for FRIdNGEParticipant
Find: (?s)^.+
Replace by: [nothing]
Find Format: +Bold
Replace format: Your_Para_Style… Personal view: by security, I would run before: .+ & condition
-
February 8, 2018 at 5:09 am #101552Shirly Oshrat PasternakMember
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? -
February 8, 2018 at 4:05 pm #101594Graham ParkMember
(?s) Single Line On
^ Beginning of Paragraph
. Find any character
+ Repeat zero or more time -
February 10, 2018 at 2:22 pm #101623Shirly Oshrat PasternakMember
Thank you Graham!
-
-
AuthorPosts
- You must be logged in to reply to this topic.