GREP for hyphen to en-dash

Community Beginner ,
Oct 18, 2019 Oct 18, 2019

Copy link to clipboard

Copied

There used to be a great GREP code here "https://forums.adobe.com/thread/875126" for turning all hyphens between numbers into en-dashes, without affecting the numbers -- it worked for any number of digits. As these old forum links aren't working at the moment could anyone offer up some tasty grep code to help?

 

E.g. 1-2, 3-12, 14-25, 43543254325-54254352435, etc...

Views

502

Likes

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

correct answers 1 Correct Answer

Adobe Community Professional , Oct 18, 2019 Oct 18, 2019
Sure. Find: (\d+)-(\d+) Change: $1~=$2   ~Barb

Likes

Translate

Translate
Adobe Community Professional ,
Oct 18, 2019 Oct 18, 2019

Copy link to clipboard

Copied

Sure.

 

Find: (\d+)-(\d+)

Change: $1~=$2

Screen Shot 2019-10-18 at 9.11.14 AM.png

~Barb

Likes

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 Beginner ,
Oct 18, 2019 Oct 18, 2019

Copy link to clipboard

Copied

Many thanks. I'm sure the one I've used previously was more complex, but that worked great -- thanks again!

Likes

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
Adobe Community Professional ,
Oct 18, 2019 Oct 18, 2019

Copy link to clipboard

Copied

Happy to help, Adam.

 

~Barb

Likes

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
New Here ,
Mar 12, 2021 Mar 12, 2021

Copy link to clipboard

Copied

Hi, is there any chance to replace hyphen sign in all text (auto hyphen when you choose language) with en-dash?

Likes

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
Adobe Community Professional ,
Mar 12, 2021 Mar 12, 2021

Copy link to clipboard

Copied

LATEST

Hi @Tea5EAA:

 

Look into IndyFont: Indiscripts :: Customize InDesign Hyphens with IndyFont

 

~Barb

 

 

Likes

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