Is it possible to check if there is AT LEAST few numbers (digit) in a string AND AT LEAST few hypen ("-") in a string?
For example:
$at_least_number = 4
$at_least_hypen = 2
then
"abcde812" --> false, because there are only 3 numbers on the string AND there is no hypen ("-") in the string
"abcde8112" --> false, because even there are 4 numbers (or more) in the string, the hypen is <= 2
"abcd-e8112-11" --> true, because there are 4 numbers (or more) in the string and there are 2 (or more) "-" in the string
"---43" --> false, because even there are only 2 (or more) "-" in the string, there are only 2 numbers in the string
Thanks in advance
For example:
$at_least_number = 4
$at_least_hypen = 2
then
"abcde812" --> false, because there are only 3 numbers on the string AND there is no hypen ("-") in the string
"abcde8112" --> false, because even there are 4 numbers (or more) in the string, the hypen is <= 2
"abcd-e8112-11" --> true, because there are 4 numbers (or more) in the string and there are 2 (or more) "-" in the string
"---43" --> false, because even there are only 2 (or more) "-" in the string, there are only 2 numbers in the string
Thanks in advance
