How to verify if a string is of the following format?
VARCHAR(n..m)
Where n >= 0; m > n; m <= 65535
Examples valid strings:
$s = "VARCHAR(100)";
$s = "VARCHAR(1)";
$s = "VARCHAR(65535)";
$s = "varchar(50)";
Examples invalid strings:
$s = "VARCHAR()";
$s = "VARCHAR(70000)";
$s = "VARHAR(50)";
$s = "varchar";
Can this be done with PHP preg_match() or with a different method?
source https://stackoverflow.com/questions/68604835/how-to-verify-that-a-string-contains-a-valid-mysql-varchar-data-type
Comments
Post a Comment