<?php $string = "12example"; if (preg_match("/^[0-9]{2}/", $string)) { echo "The first two characters are numbers."; } else { echo "The first two characters are not numbers."; }
You have javascript disabled. You will not be able to edit any code.