Reply To: Needed: script or GREP search to standardize dash spacing

#75862
Aaron Troia
Participant

Hey Josh,

You shouldn’t need a script, this is a good case for using GREP, try this, my replace is just an example of inserting fixed non-breaking spaces before and after, you can replace the ~s (fixed width non-breaking space) with what ever you need. For the GREP search itself, I have included both a regular space (you could try using as well, instead of a literal space), non-breaking space (~S), and fixed width non-braking space (~s), you can add/subtract the types of spaces that might be used throughout.

Find: ( |~S|~s)?(—)( |~S|~s)?(?<!~})
Replace: ~s$2~s

Let me know if that helps or if it needs modification/tweaking.

Aaron

This article was last modified on June 5, 2015

Comments (0)

Loading comments...