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

GREP to add space in 6 digit numbers

Engaged ,
Aug 15, 2023 Aug 15, 2023

Copy link to clipboard

Copied

Hi all. As the title suggests, I have a long list of product SKUs in a document and the powers that be would like the 6 digit SKU to have a space in the middle ie be two groups of 3 digits. Any chance of help with a GREP that I can use with this paragrapgh style to automate this? Thanks for any input.

TOPICS
Type

Views

126

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 Expert ,
Aug 15, 2023 Aug 15, 2023

Copy link to clipboard

Copied

Replying from my phone but I think it would be something like this:

 

(\d\d\d)(\d\d\d)

 

$1(space you want)$2

 

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 Expert ,
Aug 15, 2023 Aug 15, 2023

Copy link to clipboard

Copied

Hi @Spenno:

 

Any chance of help with a GREP that I can use with this paragrapgh style to automate this?

We use GREP in two locations in InDesign: as a Find/Change activity and a GREP style.

 

We use GREP styles in a paragraph style to apply formatting and Find/Change to edit the content. In your case, if you want to add a space between six characters you can use Robert's suggestion as a Find/Change GREP query and not in a paragraph style.

 

2023-08-15_11-49-18 (1).gif

 

~Barb

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 15, 2023 Aug 15, 2023

Copy link to clipboard

Copied

LATEST

I just answer to Spenno's question: use a Grep style in your para style:

 

Capture d’écran 2023-08-15 à 21.03.01.png

Capture d’écran 2023-08-15 à 21.07.40.png

 

Capture d’écran 2023-08-15 à 21.08.18.png

 

(^/)  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