x
login register about faq

How to seperate numbers from a string in JavaScript?

more ▼

asked Jan 02, 2013 at 12:47 PM

mounu.13 gravatar image

mounu.13
17 4 5 4

(comments are locked)
10|600 characters needed characters left

4 answers: sort voted first

We can do this with the help of Regular Expression in JavaScript.

function stripNumbers(){
strippedString = originalString.replace(/[0-9]/g, "");
document.getElementById("strippedstring").innerHTML=strippedString;
}

check this page for more complete information

more ▼

answered Jan 02, 2013 at 12:50 PM

suresh44t gravatar image

suresh44t
2 2

(comments are locked)
10|600 characters needed characters left

Both Excel and esCalc can also solve such kind of question.

more ▼

answered Jan 14, 2013 at 03:19 AM

JessicaQiu gravatar image

JessicaQiu
17 8 10 10

(comments are locked)
10|600 characters needed characters left

use javascript isNAN to identify not a number.

more ▼

answered Jan 21, 2013 at 07:30 AM

mehulchauhan gravatar image

mehulchauhan
2

(comments are locked)
10|600 characters needed characters left

Can Javascript be used to develop iphone unlocking app? Check out my website to unlock any iPhone IMEI code.

more ▼

answered May 07, 2013 at 12:20 PM

maja.filova gravatar image

maja.filova
1 2

(comments are locked)
10|600 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x3

asked: Jan 02, 2013 at 12:47 PM

Seen: 1078 times

Last Updated: May 07, 2013 at 12:20 PM