method getNumbers documentation in bbn\Str
Extracts all digits from a string.
Example
X::dump(\bbn\Str::getNumbers("test 13 example 24"));
// (string) "1324"
X::dump(\bbn\Str::getNumbers("test example"));
// (string) ""
function($st)
{
return preg_replace("/[^0-9]/", '', self::cast($st));
}
Extracts all digits from a string. BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way
This website uses cookies to ensure you get the best experience on our website.
© 2011-2025
BBN Solutions