What is a php regular expression that will allow letters and spaces. But spaces only after the first word?
Thank You
$rex = '/^[a-zA-Z][a-zA-Z ]*$/';
Or
$rex = '/^[a-z][a-z ]*$/i'; // i means case insensitive
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With