$output = preg_replace( '/[^0-9]/', '', $string );
How can I change the above line to only accept 11 digit
long numbers that must start with either 01, 02, 03, 05, 07 or 08, but NOT 04, 06, 09
?
Use following pattern:
/^0[123578]{1}[0-9]{9}$/