[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: phone number format -Reply
- Subject: Re: phone number format -Reply
- From: "Buchanan, Timothy" <buchanan@BIPERF.COM>
- Date: Wed, 23 Jun 1999 16:11:49 -0500
Hmm...this seems to work. Am I missing something??
unstring $phone by '-' into $ph1 $ph2 $ph3
let $phone = $ph1 || $ph2 || $ph3
unstring $phone by '/' into $ph1 $ph2 $ph3
let $phone = $ph1 || $ph2 || $ph3
unstring $phone by ' ' into $ph1 $ph2 $ph3
let $phone = $ph1 || $ph2 || $ph3
thanks
Timm
On Wednesday, June 23, 1999 3:45 PM, John Milardovic [SMTP:milardj@SX.COM]
wrote:
> This is the first thing that came to mind. It's not as foolproof as
Davids
> approach but it is much less code.
> 1 2
>
> let $phone2=translate(&phone,' +/\|-_','')
>
> Where '1' are the characters you want to screen out and '2' is a null.
Like
> I said its not foolproof but its simple.
>
> HTH
> John Milardovic
> > -----Original Message-----
> > From: David Anderson [SMTP:DANDERS1@SMTPGW.IS.HFH.EDU]
> > Sent: Wednesday, June 23, 1999 5:29 PM
> > To: Multiple recipients of list SQR-USERS
> > Subject: phone number format -Reply
> >
> > This isn't an elegant approach, but you could scan through
> > the source variable one character at a time. Test if the
> > character is a number. If true, concat the character to your
> > target variable.