Menu
Folks,
What is this regex doing ?
[code]
$name = test_input($_POST[“name”]);
if (!preg_match(“/^[a-zA-Z-‘ ]*$/”,$name)) {
$nameErr = “Only letters and white space allowed”;
}
I can understand it is saying you can only type alpha chars small or Capital. [a-zA-Z] but what do all the other part of the code mean ?