Skip to main content
Inspiring
April 3, 2024
Answered

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

  • April 3, 2024
  • 3 replies
  • 621 views

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 ().

 

 

This topic has been closed for replies.
Correct answer Pariah Burke

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

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

3 replies

cbishop01Author
Inspiring
April 4, 2024

Never mind i figured it out. instead of using the grep code  i just did \(123\) 123-4567 and it worked.  thanks again 

cbishop01Author
Inspiring
April 4, 2024

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.

Robert at ID-Tasker
Legend
April 4, 2024
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?

 

Pariah Burke
Community Expert
Pariah BurkeCommunity ExpertCorrect answer
Community Expert
April 3, 2024

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

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

cbishop01Author
Inspiring
April 4, 2024

Worked perfect! thank you very much!