Skip to main content
eyeQcreative
Participant
August 12, 2021
Answered

GREP STYLE help needded

  • August 12, 2021
  • 2 replies
  • 663 views

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

This topic has been closed for replies.
Correct answer eyeQcreative

This works fine. It slipped my mind.

It works also with repeat. Thank you!

2 replies

FRIdNGE
August 12, 2021

If you mean, simplistically, something like this:

 

12345678901234

 

… so, do simply:  

 

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

 

(^/)  The Jedi

eyeQcreative
Participant
August 12, 2021

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

Nemesis666first
Inspiring
January 17, 2022

+1.

Inspiring
August 12, 2021

Or you could use nested character styles...

 

eyeQcreative
eyeQcreativeAuthorCorrect answer
Participant
August 12, 2021

This works fine. It slipped my mind.

It works also with repeat. Thank you!