11-15-2013, 07:32 AM
Hi Nate,
your needs is far more complicated as you need many phone numbers formatted
in differents ways.
You can just adapt the code to mtch all patterns.
findrx(s "(\d{3}-\d{3}-\d{4})" 0 4 t)
try:
800-123-1234 (\d{3}-\d{3}-\d{4})
(800)123-1234 (\(\d{3}\)\d{3}-\d{4})
800.123.1234 (\d{3}\.\d{3}\.\d{4})
800 123 1234 (\d{3} \d{3} \d{4})
maybe a general one can be found, something like
(\d{3}).*(\d{3}).*(\d{4})
all is non tested, but you get the picture..
HTH
your needs is far more complicated as you need many phone numbers formatted
in differents ways.
You can just adapt the code to mtch all patterns.
findrx(s "(\d{3}-\d{3}-\d{4})" 0 4 t)
try:
800-123-1234 (\d{3}-\d{3}-\d{4})
(800)123-1234 (\(\d{3}\)\d{3}-\d{4})
800.123.1234 (\d{3}\.\d{3}\.\d{4})
800 123 1234 (\d{3} \d{3} \d{4})
maybe a general one can be found, something like
(\d{3}).*(\d{3}).*(\d{4})
all is non tested, but you get the picture..
HTH
