<?php $input = "2509,2222222"; // Regex number comma number (zero - two) Preg_match("/(\d+),*(\d{0,2})/", $input, $m); Unset($m[0]); // remove full match Echo implode("", $m); // implode parts
You have javascript disabled. You will not be able to edit any code.