Copy link to clipboard
Copied
I want to do a GREP to bold the first word of every paragraph IF the first word has a colon after it.
Basically i dont want it to bold if there is no colon after the first word (if i could build it to only apply to the first two words even better)
Can this be done?
Copy link to clipboard
Copied
I tired this and i think it works
^\S+:
Copy link to clipboard
Copied
If you will only have one colon per paragraph, you could use GREP Style in the paragraph settings.
.*(?=:)
The code could be modified to stop at the first colon if necessary.
Copy link to clipboard
Copied
I would prefer nested styles for that (Performance!).
But as GREP in paragraph style - try the following.
I don't know what exactly you want. Here are a few slightly different examples.
^[^:]+?:
^[^:]+?(?=:)
^[\l\u]+?:
^[\l\u]+?(\h[\l\u]+?)?:
If that works for you
have fun
😉
Copy link to clipboard
Copied
Awesome thanks, I have used paragraph styles and it worked mostly, however a few issues if not every paragraph has a colon it bolds the text till it finds one. i just wanted to add it to my main paragraph style so all text remains as is unless there is a colon after the firswt word then it wouold bold the first word. Thanks!
Copy link to clipboard
Copied
… and it worked mostly, however a few issues if not every paragraph has a colon it bolds the text till it finds one …
By @Nathan Rule
That shouldn't happen.
Can you show a screenshot and the grep style please?
Copy link to clipboard
Copied
“... That happens all the time!” 😉
(^/) The Jedi
Copy link to clipboard
Copied
Imho [… but it's just a personal comment!],
^[^:]+?:
doesn't seem to me a Grep syntax particularly relevant (":" double exlusion)!
^[^:]+:
or
^.+?:
(^/)
Copy link to clipboard
Copied
Don't do a GREP; do a nested style.
Copy link to clipboard
Copied
Unless I'm missing something (entirely possible), I don't think nested styles would work for paragraphs without colons.
Nested style coding:
Grep coding (^.*?(:)
Copy link to clipboard
Copied
Couldnt have done it better myslef. Exactly why i wanted a grep style.
Copy link to clipboard
Copied
Remember the question:
I want to do a GREP to bold the first word of every paragraph IF the first word has a colon after it.
Basically i dont want it to bold if there is no colon after the first word (if i could build it to only apply to the first two words even better)
Can this be done?
By @Nathan Rule
please give some concrete examples or better: a sample file for testing.
Otherwise everything is just a shot in the dark.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more