I need a regular expression that will find all the numbers on a sentence. For example: \"I have 3 bananas and 37 balloons\" I will get:
3
37
\"The time i
Split your string by [^0-9]+.
[^0-9]+
JAVA: String[] numbers = "yourString".split("[^0-9]+");
String[] numbers = "yourString".split("[^0-9]+");
JavaScript: var numbers = "yourString".split(/[^0-9]+/);
var numbers = "yourString".split(/[^0-9]+/);
PHP: $numbers = preg_split("/[^0-9]+/", "yourString");
$numbers = preg_split("/[^0-9]+/", "yourString");