Hopefully I make sense here I have a few questions. An example - Say I have a string containing letters, numbers and characters (e.g - 'money: 200'), firstly I would like to use a regular expression to recognise a string similar to that which would be input by the user into an HTML field. Secondly, I would like to use a regular expression to store the numerical value (in the example; 200), now I know I can do that using parenthesis, but I only know how to do it for a single digit (/\d+/) and i'm not sure how to recall the stored value. Thanks in advance for any help EDIT: I've tried /money:/i (/\d*/) in a regular expression debugger, but it doesn't seem to be recognising it. Got it - /^[Money]*?: ([1-9]\d+$)/ Code (markup): After some fiddling, now I just need help with calling that stored value.
var reg = /money:(\d+)/gi; var ret = reg.exec("Rise your money:10 every day"); alert('money value:'+ret[1]); Code (markup): Does it makes help?