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

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

267

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

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

Votes

Translate

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

This works fine. It slipped my mind.

It works also with repeat. Thank you!

Votes

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

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

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

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

Copy link to clipboard

Copied

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

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

Copy link to clipboard

Copied

LATEST

+1.

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