Copy link to clipboard
Copied
I have a a document where i need to change the format of the start of over 200 codes to bold. How can I use GREP to change the first 5 variables to bold?
e.g BE60V06FGWU to BE60V06FGWU
Thanks
Have you considered using a nested paragraph style where you choose to go thru 5 letters, applying bold?
Copy link to clipboard
Copied
Have you considered using a nested paragraph style where you choose to go thru 5 letters, applying bold?
Copy link to clipboard
Copied
+1
Nested paragraph styles instead of GREP style is the way to go.
Its really easy to set up - You just need a Bold Character Style and then to give it some instructions as below:
Best,
EW
Copy link to clipboard
Copied
Not sure!
Grep style:
\b([\u\d]){5}(?=(?1){6}\b)
(^/)
Copy link to clipboard
Copied
Try "your nested style" on this:
e.g BE60V06FGWU to BE60V06FGWU
(^/)
Copy link to clipboard
Copied
I don't understand the test?
You want me to bold both instances?
Copy link to clipboard
Copied
Try this for style :
Did I pass?
Best,
EW
Copy link to clipboard
Copied
That's not to say you can't do the same thing with GREP.... You're answer is equally correct... I think we were just suggesting that a nested style might be easier.
I'm happy to let the OP decide the correct answer if we are to take his question literally...
Copy link to clipboard
Copied
"Nested style" feature is a static and very specific tool to be used in very specific situations!
Not Grep styles!
Try now to play your way and try mine with:
blablabla blabla BE60V06FGWU blabla BE60V06FGWU blabblab BE60V06FGWU bla BE60V06FGWU!
… and it's not because the op says it's correct [he can!] that "is the way to go"!
Of course, I often use nested styles too and I'll use here … if I know that my catch is only the beginning of a para!
Good luck!
(^/)
Copy link to clipboard
Copied
Yes absolutely agree here...
GREP Styles are really useful and I would love to be able to better use them then my current knowledge allows me:
BUT: No style is infallible without knowing the specific end goal and how the document is set up:
A nested style could be the easiest way to achieve what the OP wants... OR GREP could be the better solution.
BTW Obi: are there any tutorials or videos on how to learn how to better use GREP?
Thanks for a laugh and a good challenge.
Best,
EW
Copy link to clipboard
Copied
This summer, I organize several seminars in a monastery in Tibet!
Thanks for subscribing at: grep.tibet@buttertea.com
(^/)
Copy link to clipboard
Copied