I've got the following JavaScript code snippet:
var regex1 = new RegExp('\\d+');
var text = "3434 f dfgf df5z6 ddf 22";
var result = text.match(regex1);
In this example I want every numbers. But the problem is, only the first number is stored. result[0]=3434
and the rest of result
is empty. Where is my mistake?
Thx.