I have this string: "20 plus 1000 is not 20000."
And I want to get the position of the first number bigger than 10000.
I'm actualy (and for a different purpose) using this first answer code to get the position of the first number in my string:
function firstNumPos($text){
preg_match('/^\D*(?=\d)/', $text, $m);
return isset($m[0]) ? strlen($m[0]) : false;
}
But it doesn't distinguish between number sizes, so, what could be missing for this function to get the position of the first occurence of a number bigger than 10000?
Any solution is welcome, not necessarily by using that function.