I have form where user submits field. Field can have letters, numbers, and punctuation. But I want to check to make sure that at least 3 of the characters are letters. How can I regex that?
For example,
$string = "ab'c";
And I need something like,
if (preg_match("/[a-z]{3}/i", $string))
print "true";
else
print "false";
That string has three letters, even though it has an apostrophe. It should test true. But for some reason, that tests false right now.
Any help?