Copy link to clipboard
Copied
Before a computer crash/replacement, I had a GREP query that made sure all phone numbers wound't hyphenate/break to another line (keeping the entire phone number together). My backup drive hasn't arrived yet and I need this query to run on a magazine (with lots of phone numbers at the ends of 400 articles). I can't remember how I created it and some of things I have tried today aren't working. I've tried searching for a GREP query online, but found nothing specific.
Can anyone give me the query to save me some time?
Yes, I figured it out.
I'm importing editorial (40 pages worth) that have phone numbers in each paragraph. These phone numbers are laid out as 206-444-1515, for example.
I created a query that replaced all the hyphens with a non-breaking hyphen and that worked (Thank you, Barb).
Copy link to clipboard
Copied
Hi,
Samples!
(^/)
Copy link to clipboard
Copied
How, exactly, do you format the phone numbers? If you are using hyphens (i.e., 703-370-3661) you could simply swap the hyphens for non-breaking hyphens (which are not allowed at the end of a line.)
Copy link to clipboard
Copied
Are you looking for the exact query? Or how to keep them from breaking? I generally apply a character style with No Break applied to keep them together. How are your phone numbers formatted? If you have them formatted in different ways, it'll need to be more inclusive...but let's make it as simple as it needs to be for your use.
Copy link to clipboard
Copied
Did you ever get this figured out?
Copy link to clipboard
Copied
Yes, I figured it out.
I'm importing editorial (40 pages worth) that have phone numbers in each paragraph. These phone numbers are laid out as 206-444-1515, for example.
I created a query that replaced all the hyphens with a non-breaking hyphen and that worked (Thank you, Barb).
Copy link to clipboard
Copied
Hi,
Can you show us your query?
(^/)