View Single Post
  #1 (permalink)  
Old November 1st, 2006, 12:07 PM
blkskullwork blkskullwork is offline
Authorized User
Join Date: Nov 2006
Location: St James, Manitoba, Canada.
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default Extract first numeric string

Hi all:
I new here and also new to javascript so I hope you'll be patient if I ask dumb questions. I have a text box with a static value of $2.99 and I want to extract just the 2.99 value and multiply it by a quantity to get a total. While I was searching for something completely different the other day I came across function(I think) which it said would extract the first numeric string in a string including decimal places if there were any. The example it gave was if you had a string of "a62.99retail" it would extract "62.99". The thing is I can't remember what the function was called or where I found it, if anyone could tell me what this function is or a similar one it would greatly appreciated.

Reply With Quote