• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Help changing first 5 variables of my code to bold

New Here ,
May 22, 2017 May 22, 2017

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

Views

503

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , May 22, 2017 May 22, 2017

Have you considered using a nested paragraph style where you choose to go thru 5 letters, applying bold?

Votes

Translate

Translate
Community Expert ,
May 22, 2017 May 22, 2017

Copy link to clipboard

Copied

Have you considered using a nested paragraph style where you choose to go thru 5 letters, applying bold?

Mike Witherell

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
May 23, 2017 May 23, 2017

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:

2017-05-23_09-46-04.png

Best,

EW

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 23, 2017 May 23, 2017

Copy link to clipboard

Copied

Not sure!

Grep style:

\b([\u\d]){5}(?=(?1){6}\b)

(^/)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 23, 2017 May 23, 2017

Copy link to clipboard

Copied

Try "your nested style" on this:

e.g BE60V06FGWU  to  BE60V06FGWU

(^/) 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
May 23, 2017 May 23, 2017

Copy link to clipboard

Copied

I don't understand the test?

You want me to bold both instances?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
May 23, 2017 May 23, 2017

Copy link to clipboard

Copied

Try this for style :

2017-05-23_10-34-12.png

Did I pass?

Best,

EW

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
May 23, 2017 May 23, 2017

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...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 23, 2017 May 23, 2017

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!

(^/)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
May 23, 2017 May 23, 2017

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:

2017-05-23_11-17-17.png

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 23, 2017 May 23, 2017

Copy link to clipboard

Copied

This summer, I organize several seminars in a monastery in Tibet!
Thanks for subscribing at: grep.tibet@buttertea.com

(^/)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 23, 2017 May 23, 2017

Copy link to clipboard

Copied

LATEST

Join The Rebellion here:

https://www.facebook.com/groups/TreasuresofGrep/

(^/) 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines