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

GREP for hyphen to en-dash

Explorer ,
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

2.2K

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

Community Expert , Oct 18, 2019 Oct 18, 2019

Sure.

 

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

Change: $1~=$2

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

 

~Barb

Votes

Translate

Translate
Community Expert ,
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

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
Explorer ,
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!

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

Copy link to clipboard

Copied

Happy to help, Adam.

 

~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
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?

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

Copy link to clipboard

Copied

LATEST

Hi @TeaJ:

 

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

 

~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