I decided is about time I learn some egex. I hope you guys can help me.
I am stuck in the most simple concept
the rule: any uppercase character is will cause the whole string to be invalid.
Code: Select all
if (!preg_match('/[a-z]/', 'xxxxXxxx'))
echo 'invalid';
else
echo 'valid';When I create rules do I put all the valid characters or the invalid characters?
The first thing I would like is the regular expression for a valid person name. I guess there should be no numbers and no strange characters either(like !@#$%^&*()_+=-[]| ....)
Thank you
PS: I read the tutorials but still stuck.
