Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


GREP STYLE help needded

Community Beginner ,
Aug 12, 2021 Aug 12, 2021

Copy link to clipboard

Copied

In a column of a table with 14digits product codes I need to have a paragraph style of 2digits bold, 2 digits plain, 2digits bold and so on... for better readability. Could someone give me a Grep code that works? Thank you

TOPICS
How to

Views

95

Likes

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 2 Correct answers

Advisor , Aug 12, 2021 Aug 12, 2021
If you mean, simplistically, something like this: 12345678901234 … so, do simply:   ((\d{2})|\G)\K(?2)(?=(?2)) (^/)  The Jedi

Likes

Translate

Translate
Community Beginner , Aug 12, 2021 Aug 12, 2021
This works fine. It slipped my mind.It works also with repeat. Thank you!

Likes

Translate

Translate
Explorer ,
Aug 12, 2021 Aug 12, 2021

Copy link to clipboard

Copied

Or you could use nested character styles...

 

Screenshot 2021-08-12 at 12.58.33.png

Likes

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
Community Beginner ,
Aug 12, 2021 Aug 12, 2021

Copy link to clipboard

Copied

This works fine. It slipped my mind.

It works also with repeat. Thank you!

Likes

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 ,
Aug 12, 2021 Aug 12, 2021

Copy link to clipboard

Copied

If you mean, simplistically, something like this:

 

12345678901234

 

… so, do simply:  

 

((\d{2})|\G)\K(?2)(?=(?2))

 

(^/)  The Jedi

Likes

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
Community Beginner ,
Aug 12, 2021 Aug 12, 2021

Copy link to clipboard

Copied

LATEST

This works fine. Thank you!
Could you please explain the coding in order to learn something out of it?

Likes

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