I need a Regex to accept the input only following possible cases like
1.It start with characters only [a-zA-Z]
2.It may contains numbers but it may not repeated 3 or moretimes.
Example:
akjsjdfljsfjl133113 Valid
123123sfsf not valid
asfsdf1111asdf notvalid adf111 not valid
I have tried this code
$input_line="sfjs123232";
preg_match("/^[a-zA-Z](\d)\1{2,}/", $input_line, $output_array);
adf111
not valid?repeated three times
means that it is present four or more times (the first instance, then the three repeats.) :)a121212121212
acceptable? The digits 1 and 2 are repeated many times in the string. If it is acceptable and you only meant not repeated consecutively, then I misunderstood the question.