in reply to Re: Phone reg expression
in thread Phone reg expression

Hi particle.
Regexp::Common was going to be my suggestion, but i can't figure out what Regexp::Common::URI::tel wants (or if that is even the right class to use):
use Regexp::Common qw /URI/; while (<DATA>) { /$RE{URI}{tel}/ and print "$_ contains a telephone URI.\n"; } __DATA__ 555-5555 555-555-5555 (555) 555-5555
any thoughts? anyone? :)

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)

Replies are listed 'Best First'.
Re: Phone reg expression
by Abigail-II (Bishop) on Apr 18, 2003 at 22:54 UTC
    tel:+12345 tel:+358-555-1234567 tel:456-7890;phone-context=213 tel:456-7890;phone-context=X-COMPANY-NET tel:+1-212-555-1234;tsp=terrifictelecom.com tel:+1-212-555-1234;tsp=terrifictelecom.com;phone-context=X-COMPANY-NE +T tel:+358-555-1234567;postd=pp22 tel:0w003585551234567;phone-context=+3585551234 tel:+1234567890;phone-context=+1234;vnd.company.option=foo tel:+1234567890;phone-context=+1234;vnd.company.option=%22foo%22 tel:+1234;option=%22!%22 tel:+1234;option=%22%5C%22%22 tel:+1234;option=%22%5C!%22 tel:+1234;option=%22bar%22 tel:+456-7890;phone-context=213;phone-context=213 tel:456-7890;phone-context=213;phone-context=213 tel:+123-456-789;isub=123(456) tel:+123456;postd=***

    For details, see RFC 2806.

    Abigail

      Que?

        Did you read and understand the question of its parent node?

        Abigail