There are no unnecessary links!
See http://jsfiddle.net/5WJ9v/
Code:
var text = "1dozen 3 dozen dozen1 30/kg"; var regex = /(\d+)/g; alert(text.match(regex));
You get a matching object with all your numbers.
The script above correctly warns 1,3,1,30
.
source share