K
K. Shier
my regex for matching phone #'s:
\({0,1}(?<areacode>[0-9]{3})\){0,1}( |-){0,1}(?<prefix>[0-9]{3})(
|-){0,1}(?<suffix>[0-9]{4})
which i then .Replace to become:
(${areacode}) ${prefix}-${suffix}
question: how do i fix the match regex so that it 'stops' after the suffix
of the phone # is matched? right now, it will return '(800) 555-1212345' if
i type in '8005551212345' - i just want '(800) 555-1212'.
as always, any help would be much appreciated! thanks!
\({0,1}(?<areacode>[0-9]{3})\){0,1}( |-){0,1}(?<prefix>[0-9]{3})(
|-){0,1}(?<suffix>[0-9]{4})
which i then .Replace to become:
(${areacode}) ${prefix}-${suffix}
question: how do i fix the match regex so that it 'stops' after the suffix
of the phone # is matched? right now, it will return '(800) 555-1212345' if
i type in '8005551212345' - i just want '(800) 555-1212'.
as always, any help would be much appreciated! thanks!