Answers for "php regex match numbers and text"

PHP
3

php regex only number

$output = preg_replace( '/[^0-9]/', '', $string );
Posted by: Guest on June-19-2020
0

php regex only number

$output = preg_replace("/\D+/", "", $input);
Posted by: Guest on January-26-2022

Code answers related to "php regex match numbers and text"

Browse Popular Code Answers by Language