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

Paragraph styles (Grep Style) work with phone #s?

Advocate ,
Apr 03, 2024 Apr 03, 2024

Copy link to clipboard

Copied

Hello i'm having trouble with grep styles BOlding phone #'s I'm sure its because the. HOw would i write the grep that will allow (123) 123-4567 to bold when entered? I have grep styles working for all kinds of text but this i cannot get to work. I'm assuming its because the ().

 

 

TOPICS
Type

Views

167

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 , Apr 03, 2024 Apr 03, 2024

In the GREP Style "To Text" field enter this code:

\+?\d{0,3}\s?\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}

Votes

Translate

Translate
Community Expert ,
Apr 03, 2024 Apr 03, 2024

Copy link to clipboard

Copied

In the GREP Style "To Text" field enter this code:

\+?\d{0,3}\s?\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}

- Just published! My 10th book: InDesign Masterclass: Text Techniques, 150+ step-by-step InDesign recipes to elevate your projects today!

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
Advocate ,
Apr 04, 2024 Apr 04, 2024

Copy link to clipboard

Copied

Worked perfect! thank you very much!

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
Advocate ,
Apr 04, 2024 Apr 04, 2024

Copy link to clipboard

Copied

ok secondary question. I just noticed this is working perfectly "Except" i have 2 phone #'s i done need bolded is there a way t o exclude a phone#? 2 of the phone #'s that are being bolded that shoulded are formatted like this 123 456-7890. I dont know if that matters.

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 ,
Apr 04, 2024 Apr 04, 2024

Copy link to clipboard

Copied

LATEST
quote

ok secondary question. I just noticed this is working perfectly "Except" i have 2 phone #'s i done need bolded is there a way t o exclude a phone#? 2 of the phone #'s that are being bolded that shoulded are formatted like this 123 456-7890. I dont know if that matters.


By @cbishop01

 

Can you rephrase your question?

 

You want BOTH, FIRST or SECOND only?

 

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
Advocate ,
Apr 04, 2024 Apr 04, 2024

Copy link to clipboard

Copied

Never mind i figured it out. instead of using the grep code  i just did \(123\) 123-4567 and it worked.  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