Copy link to clipboard
Copied
Can anyone help me with a GREP for making dashes consistent? I want all dashes to be sixth space, Em dash, sixth space:
Further GREP
Find
\s*\p{Pd}+\s*
Replace
~%~_~%
\h*[~=~_]+\h*
(^/) The Jedi
Copy link to clipboard
Copied
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:
You can save GREP queries, so you can save one for each combination of dashes and spaces that you want to change.
I hope this helps. I'm not a GREP expert, but this does work.
Copy link to clipboard
Copied
You might try
\p{Pd}
or
\p{Dash_Punctuation}
Should catch any kind of hyphen or dash.
Copy link to clipboard
Copied
Further GREP
Find
\s*\p{Pd}+\s*
Replace
~%~_~%
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
\h*[~=~_]+\h*
(^/) The Jedi
Copy link to clipboard
Copied
Thanks @FRIdNGE !
Copy link to clipboard
Copied
.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now