Pulling your text and replacing the spaces in the tab areas and then 
Running the following
(?:[- (\.\d]+)?(\d{3})(?:[- )\.]+)?(\d{3})(?:[- )\.]+)?(\d{4})
with a replacement of
\1-\2-\3
yields the following
Name1        123-456-7890        Single Lifetime
Name2        123-456-7890        Joint Lifetime
Name3        123-456-7890        Joint Lifetime
Name4        123-456-7890        Single
Name5        123-456-7890        Single
Name6        123-456-7890        Single
Name7        123-456-7890        Joint
Name8        123-456-7890        Joint

Is that what your looking for?

On Monday, December 13, 2021 at 8:41:06 AM UTC-5 Tim A wrote:

> *Try using a negative character class like [^\d\n\r] *
> That will do it! .. and as an extra benefit catches any periods used as a 
> delimiter as well.
>
> Deepening the challenge, the phone numbers are actually in the second of 
> three columns separated by tabs. If I can get the phone numbers stripped I 
> can then impose a uniform format on them. But how do I focus the 
> find/replace on just this second column? I can do this in many small steps, 
> but figure there must be an elegant way to do it in a single step.
>
> Before...
>
> Name1        1234567890        Single Lifetime
> Name2        123-4567890        Joint Lifetime
> Name3        123-456-7890        Joint Lifetime
> Name4        (123)4567890        Single
> Name5        (123) 4567890        Single
> Name6        (123)-4567890        Single
> Name7        (123)456-7890        Joint
> Name8        123.456.7890        Joint
>
> After...
> Name1        1234567890        SingleLifetime
> Name2        1234567890        JointLifetime
> Name3        1234567890        JointLifetime
> Name4        1234567890        Single
> Name5        1234567890        Single
> Name6        1234567890        Single
> Name7        1234567890        Joint
> Name8        1234567890        Joint
>
>
>
>
>
>

-- 
This is the BBEdit Talk public discussion group. If you have a feature request 
or need technical support, please email "[email protected]" rather than 
posting here. Follow @bbedit on Twitter: <https://twitter.com/bbedit>
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/849d58f0-20dd-4219-8fa1-44e697ab3473n%40googlegroups.com.

Reply via email to