Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I would like to build up a script, here goes the requirement:
- Pull phone number ( 662-5555) from a phone attribute value looking something like this :
OfficePhoneNumber: 662-5555,+1 102 892-1314
The script should work under following circumstances :
> If two values, then the pull first value (i.e 662-5555 i in above ca +se) . > If one value, then if the phone number is of the form xxx-xxxx th +en pull this (662-5555 ). > Else, no officePhoneNumber value.
Any help is appreciated.
Regards, Prince
Code and p tags added by GrandFather
2009-05-05 Retitled by GrandFather, as per Monastery guidelines
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Help Needed to parse phone numbers
by planetscape (Chancellor) on May 05, 2009 at 04:00 UTC | |
|
Re: Help Needed to parse phone numbers
by GrandFather (Saint) on May 05, 2009 at 02:59 UTC | |
|
Re: Help Needed to parse phone numbers
by Corion (Patriarch) on May 05, 2009 at 06:25 UTC | |
|
Re: Help Needed to parse phone numbers
by paulchernoch (Acolyte) on May 05, 2009 at 14:22 UTC | |
by Anonymous Monk on May 18, 2009 at 18:10 UTC |