[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Remove extra chars from phone

Posted on 2008-06-21
2
Medium Priority
?
268 Views
Last Modified: 2008-06-23
I allow users to enter phone in format of (111) 999-9999

Have () and dashes.

I want to remove them before saving it. I know I can use "replace". But anyone has a function I can use to replace ALL characters...even $ or & or *?  Just keep numbers..not even keep a space...
0
Comment
Question by:Camillia
2 Comments
 
LVL 55

Accepted Solution

by:
Jaime Olivares earned 2000 total points
ID: 21839508
you can use regex. you can do something like this:

Dim regex as Regex = New Regex("[^0-9]")
Dime digits as String = regex.Replace(phone, "")
0
 
LVL 7

Author Comment

by:Camillia
ID: 21839522
let me try, thanks. kamila.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Suggested Courses
Course of the Month18 days, 4 hours left to enroll

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question