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

GREP STYLE help needded

Community Beginner ,
Aug 12, 2021 Aug 12, 2021

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
466
Translate
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

Guide , 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

Translate
Community Beginner , Aug 12, 2021 Aug 12, 2021

This works fine. It slipped my mind.

It works also with repeat. Thank you!

Translate
Explorer ,
Aug 12, 2021 Aug 12, 2021

Or you could use nested character styles...

 

Screenshot 2021-08-12 at 12.58.33.png

Translate
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

This works fine. It slipped my mind.

It works also with repeat. Thank you!

Translate
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
Guide ,
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

Translate
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

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

Translate
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
Explorer ,
Jan 17, 2022 Jan 17, 2022
LATEST

+1.

Translate
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