Re: Pronunciation of phone numbers


 

On Sun, Sep 27, 2020 at 12:41 AM, Luke Davis wrote this regular expression:
\(?(\d)(\d)(\d)(?:\)?[ \.-]|\))(\d)(\d)(\d)[ \.-](\d)(\d)(\d)(\d)\D
-
By the way, that's very, very elegant for the purpose.  I never want you to think that my comments on the group are meant to be critical/disparaging in any way.  I'm just generally going for "quick and dirty for the common cases" while you are being incredibly thorough, and the latter is more complicated and requires great skill.

I'd actually forgotten about non-capturing groups with alternatives.  A master stroke!
--

Brian - Windows 10 Pro, 64-Bit, Version 2004, Build 19041  

It’s hard waking up and realizing it’s not always black and white.

     ~ Kelley Boorn

 

Join nvda@nvda.groups.io to automatically receive all group messages.