Ask a Question related to FileMaker, Design and Development.
-
How to remove all punctuation EXCEPT dashes?
I need to standardize phone numbers that are entered many different ways. I
can remove all punctuation then use left/middle/right functions to break
apart the number and make a calculated version but is there an easier way?
Can I remove parentheses, spaces, periods, and slashes from a phone number
field without also removing the dashes?
(216)555-1212 into 216-555-1212
(216) 555-1212 into 216-555-1212
(216) 555-1212 into 216-555-1212
(216)-555-1212 into 216-555-1212
(216)-555-1212 into 216-555-1212
216.555.1212 into 216-555-1212
216/555-1212 into 216-555-1212
and not
2165551212
Any help would be GREATLY appreciated
TIA
Guest
-
#23325 [Com]: PHP can't connect if db name has dashes
ID: 23325 Comment by: chris at sugarcrm dot com Reported By: fritz at lateral dot net Status: No Feedback Bug... -
Strip Dashes and Spaces from Credit Card
Hi, Does anyone know an easy way to strip dashes and spaces (or any other characters for that matter) from a credit card. I want to allow users... -
creating dashes to meet in corners??
is there a way I can apply dashes to a shape drawn but have the dashes always meet in the corners of the shape? I Have played around with the... -
format form field to include dashes
Hi... thought I'd ask this in a separate post. I'm creating a basic formmail form, and my client has asked me to have the phone number reformat... -
Dots and Dashes
Thanks Kim, I just needed those! Coen Kim Cavanaugh wrote: -- -
Bridget Eley #2
Re: How to remove all punctuation EXCEPT dashes?
The trick is to take everything but the numbers out using nested Substitute
functions (I'll call this CalcA:
Substitute(Substitute(Substitute(Substitute(Substi tute(Substitute(Number,
"(", ""), ")", ""), ".", ""), "-", ""), " ", ""), "/", "")
Then put the dashes back in:
Left(CalcA, 3) &"-" & Middle(CalcA, 4, 3) & "-" & Right(CalcA, 4)
Final calc:
Left(Substitute(Substitute(Substitute(Substitute(S ubstitute(Substitute(Numbe
r, "(", ""), ")", ""), ".", ""), "-", ""), " ", ""), "/", ""), 3) &"-" &
Middle(Substitute(Substitute(Substitute(Substitute (Substitute(Substitute(Num
ber, "(", ""), ")", ""), ".", ""), "-", ""), " ", ""), "/", ""), 4, 3) & "-"
&
Right(Substitute(Substitute(Substitute(Substitute( Substitute(Substitute(Numb
er, "(", ""), ")", ""), ".", ""), "-", ""), " ", ""), "/", ""), 4)
Bridget Eley
in article ZDc%a.25617$Vx2.11488935@newssvr28.news.prodigy.co m,
[email]mojotogo@sbcglobal.net[/email] at [email]mojotogo@sbcglobal.net[/email] wrote on 16/8/03 7:54 AM:
> I need to standardize phone numbers that are entered many different ways. I
> can remove all punctuation then use left/middle/right functions to break
> apart the number and make a calculated version but is there an easier way?
>
> Can I remove parentheses, spaces, periods, and slashes from a phone number
> field without also removing the dashes?
>
>
> (216)555-1212 into 216-555-1212
> (216) 555-1212 into 216-555-1212
> (216) 555-1212 into 216-555-1212
> (216)-555-1212 into 216-555-1212
> (216)-555-1212 into 216-555-1212
> 216.555.1212 into 216-555-1212
> 216/555-1212 into 216-555-1212
>
> and not
>
> 2165551212
>
> Any help would be GREATLY appreciated
>
> TIA
>
>Bridget Eley Guest
-
Shadenfroh #3
Re: How to remove all punctuation EXCEPT dashes?
How about this?
Left( Abs( TextToNum( Phone ) ) , 3 ) & "-" &
Middle( Abs( TextToNum( Phone ) ) , 1 , 3 ) & "-" &
Right( Abs( TextToNum( Phone ) ) , 4 )
Shadenfroh
<mojotogo@sbcglobal.net> wrote in message
news:ZDc%a.25617$Vx2.11488935@newssvr28.news.prodi gy.com...I> I need to standardize phone numbers that are entered many different ways.> can remove all punctuation then use left/middle/right functions to break
> apart the number and make a calculated version but is there an easier way?
>
> Can I remove parentheses, spaces, periods, and slashes from a phone number
> field without also removing the dashes?
>
>
> (216)555-1212 into 216-555-1212
> (216) 555-1212 into 216-555-1212
> (216) 555-1212 into 216-555-1212
> (216)-555-1212 into 216-555-1212
> (216)-555-1212 into 216-555-1212
> 216.555.1212 into 216-555-1212
> 216/555-1212 into 216-555-1212
>
> and not
>
> 2165551212
>
> Any help would be GREATLY appreciated
>
> TIA
>
>
Shadenfroh Guest
-
Lee Smith #4
Re: How to remove all punctuation EXCEPT dashes?
In reply to s5e%a.22612$vo2.6865@newsread1.news.atl.earthlink. net on 8/15/03
4:33 PM by Shadenfroh [email]shadenfroh@yahoo.com[/email]:
Slightly Modified
Left( Abs( TextToNum( Text ) ) , 3 ) & "-" &
Middle( Abs( TextToNum( Text ) ) , 4 , 3 ) & "-" &
Right( Abs( TextToNum( Text ) ) , 4 )
Lee
:)> How about this?
>
> Left( Abs( TextToNum( Phone ) ) , 3 ) & "-" &
> Middle( Abs( TextToNum( Phone ) ) , 1 , 3 ) & "-" &
> Right( Abs( TextToNum( Phone ) ) , 4 )
>
> Shadenfroh
>
>
> <mojotogo@sbcglobal.net> wrote in message
> news:ZDc%a.25617$Vx2.11488935@newssvr28.news.prodi gy.com...> I>> I need to standardize phone numbers that are entered many different ways.>>> can remove all punctuation then use left/middle/right functions to break
>> apart the number and make a calculated version but is there an easier way?
>>
>> Can I remove parentheses, spaces, periods, and slashes from a phone number
>> field without also removing the dashes?
>>
>>
>> (216)555-1212 into 216-555-1212
>> (216) 555-1212 into 216-555-1212
>> (216) 555-1212 into 216-555-1212
>> (216)-555-1212 into 216-555-1212
>> (216)-555-1212 into 216-555-1212
>> 216.555.1212 into 216-555-1212
>> 216/555-1212 into 216-555-1212
>>
>> and not
>>
>> 2165551212
>>
>> Any help would be GREATLY appreciated
>>
>> TIA
>>
>>
>Lee Smith Guest
-
Shadenfroh #5
Re: How to remove all punctuation EXCEPT dashes?
Oops. Didn't notice that because of the previous error you pointed out. Try
this (don't have time to test it myself at the moment).
Left( Substitute ( Abs( TextToNum( Text ) ) , "." , "" ) , 3 ) & "-" &
Middle( Substitute ( Abs( TextToNum( Text ) ) , "." , "" ), 4 , 3 ) & "-"
&
Right( Substitute ( Abs( TextToNum( Text ) ) , "." , "" ) , 4 )
Shadenfroh
"Lee Smith" <lee@pacific.net> wrote in message
news:BB62D104.2CD57%lee@pacific.net...8/15/03> In reply to BB62C764.2CD50%lee@pacific.net on 8/15/03 5:22 PM by Lee Smith
> [email]lee@pacific.net[/email]:
>
> I just noticed that this calculation breaks on the one that has periods.
>
> 216.555.1212
>
> ends up
>
> 216-.55-1212
>
> Lee
>
>> > In reply to s5e%a.22612$vo2.6865@newsread1.news.atl.earthlink. net onways.> > 4:33 PM by Shadenfroh [email]shadenfroh@yahoo.com[/email]:
> >
> > Slightly Modified
> >
> > Left( Abs( TextToNum( Text ) ) , 3 ) & "-" &
> > Middle( Abs( TextToNum( Text ) ) , 4 , 3 ) & "-" &
> > Right( Abs( TextToNum( Text ) ) , 4 )
> >
> > Lee
> >
> > :)> >> How about this?
> >>
> >> Left( Abs( TextToNum( Phone ) ) , 3 ) & "-" &
> >> Middle( Abs( TextToNum( Phone ) ) , 1 , 3 ) & "-" &
> >> Right( Abs( TextToNum( Phone ) ) , 4 )
> >>
> >> Shadenfroh
> >>
> >>
> >> <mojotogo@sbcglobal.net> wrote in message
> >> news:ZDc%a.25617$Vx2.11488935@newssvr28.news.prodi gy.com...
> >>> I need to standardize phone numbers that are entered many differentbreak> >> I
> >>> can remove all punctuation then use left/middle/right functions toway?> >>> apart the number and make a calculated version but is there an easiernumber> >>>
> >>> Can I remove parentheses, spaces, periods, and slashes from a phone>> >> >>> field without also removing the dashes?
> >>>
> >>>
> >>> (216)555-1212 into 216-555-1212
> >>> (216) 555-1212 into 216-555-1212
> >>> (216) 555-1212 into 216-555-1212
> >>> (216)-555-1212 into 216-555-1212
> >>> (216)-555-1212 into 216-555-1212
> >>> 216.555.1212 into 216-555-1212
> >>> 216/555-1212 into 216-555-1212
> >>>
> >>> and not
> >>>
> >>> 2165551212
> >>>
> >>> Any help would be GREATLY appreciated
> >>>
> >>> TIA
> >>>
> >>>
> >>
> >>
Shadenfroh Guest



Reply With Quote

