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

Dash Plus Sixth Space GREP

Community Expert ,
Sep 21, 2025 Sep 21, 2025

Can anyone help me with a GREP for making dashes consistent? I want all dashes to be sixth space, Em dash, sixth space:

 

Screen Shot 14.png

TOPICS
How to , Scripting , Type
156
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

Community Expert , Sep 21, 2025 Sep 21, 2025

Further GREP

Find

\s*\p{Pd}+\s*

 Replace

~%~_~%
Translate
Guide , Sep 22, 2025 Sep 22, 2025

\h*[~=~_]+\h*

 

(^/)  The Jedi

Translate
Community Expert ,
Sep 21, 2025 Sep 21, 2025

I think I can help.

Step 1: In your document, select the em-dash (or whatever it is you want to change). Open the Find/Change window, make sure GREP is selected, and paste what you copied into the "Find what:" field.

Step 2: Type the 6th space, Em dash, 6th space in your document, then select this and paste it into the "Change to:" field

Example: FInd/Change em-dash will look like this:

tonks_the_auror_0-1758498852223.png

You can save GREP queries, so you can save one for each combination of dashes and spaces that you want to change.

tonks_the_auror_1-1758499301652.png

 

I hope this helps. I'm not a GREP expert, but this does work.

 

 

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 Expert ,
Sep 21, 2025 Sep 21, 2025

You might try

 

\p{Pd}

or

\p{Dash_Punctuation}

 

Should catch any kind of hyphen or dash.

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 Expert ,
Sep 21, 2025 Sep 21, 2025

Further GREP

Find

\s*\p{Pd}+\s*

 Replace

~%~_~%
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 Expert ,
Sep 21, 2025 Sep 21, 2025

Suppose it will find 2005-2025 (year ranges) or minus numbers -1 -10 etc. 

 

Might not be an issue. Maybe it can be tweaked further.

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 ,
Sep 22, 2025 Sep 22, 2025

\h*[~=~_]+\h*

 

(^/)  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 Expert ,
Sep 22, 2025 Sep 22, 2025
LATEST

Thanks @FRIdNGE !

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
Engaged ,
Sep 22, 2025 Sep 22, 2025

.

Thanks,
Prabu
Design smarter, faster, and bolder with InDesign scripting.
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