Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 965145
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T01:56:50+00:00 2026-05-16T01:56:50+00:00

I have a simple app that allows the user to push a button that

  • 0

I have a simple app that allows the user to push a button that brings up the list of contacts. They select the contact and the application then puts the phone number into an edit text control. This all works like a charm.

However, I notice that the phone number that is retrieved has ‘punctuation’ marks in it: 123.456.7890 or 123-456-7890 is returned verbatim with the dots and dashes included.

Is there a simple way to strip out non-numeric entry before displaying back to the user?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T01:56:51+00:00Added an answer on May 16, 2026 at 1:56 am

    You should be able to manipulate the string using standard Java String functions to remove non numbers.

    i.e.

    myString.replaceAll("\D", "");
    

    \D is a regex that should match anything that isn’t a digit. See Pattern docs.

    replaceAll will replace all instances of the regex with whatever you provide as the second param.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 515k
  • Answers 515k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You could try the .children() function: var lis = ​$('.menu')​.children('li')​; May 16, 2026 at 6:33 pm
  • Editorial Team
    Editorial Team added an answer Use :lt(): $('#system br:lt(2)').remove(); :lt() takes a zero-based integer as… May 16, 2026 at 6:33 pm
  • Editorial Team
    Editorial Team added an answer It depends on the distribution of the random number generator.… May 16, 2026 at 6:33 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I'm writing a simple App Engine app. I have a simple page that allows
I have a simple app that consists of: Model Items Filter criteria applied to
I have a really simple J2SE app that consists of a couple of classes.
I have a simple app I am messing around with its a basic Master/Details
I'm working on a view-based iPhone app that has the following flow: search ->
I have a number of viewControllers (iPad) that manage different views presenting various screens
Surely MDI not so bad? I have an ERP-type app and I have chosen
Is there a simple line of code that would allow only loading the code
I have a question about best practices related to de-normalization or table hierarchy relationships.
I know this sounds like a really, really simple use case and I'm hoping

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.