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)
| [reply] [d/l] |
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 | [reply] [d/l] |
There are no patterns for phone numbers in Regexp::Common
yet, for the simple reason I have not found a specification
of phone numbers for any country yet.
For instance, a regexp that allows for 7 or 11 digit phone
numbers would be incorrect for the North America Plan, as
that would reject for instance 911.
Abigail | [reply] [d/l] |
| [reply] |