Welcome visitor
* Login
* Register
It is currently September 20th, 2019, 1:48 pm
All times are UTC [ DST ]
* Search
View unanswered posts - View active topics

FORUMS » Client Side » JavaScript



Post new topic Reply to topic  [ 2 posts ] 
Author Message
  count numbers inside a string
PostPosted: July 27th, 2009, 4:09 pm 

Posts: 39
hi, can you halp me with a script to find out how many numbers are inside a string?


Top
 Profile  
 
  Re: count numbers inside a string
PostPosted: July 27th, 2009, 7:33 pm 
User avatar

Posts: 56
use a regexp pattern
alert(yourstring.match(/\d/g).length);


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

FORUMS » Client Side » JavaScript


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron