Regular expression for validating names and surnames play anime dating sim
Now let’s jump into the fun part which is discussing the regular expression First we have the starting and ending slashes “/” , the expression then starts with a “^” sign to match with the beginning of the string.
First go to your html file and paste the following code : Here, I have a simple form.
I have a textbox txtname in which user add its first name and last name. First Name(Space)Last Name First Name Last Name how to do it. Not sure I'd go with that expression as it will allow for any and all values.
I want to make sure that user had inserted both his first name and last name in that textbox. Check out the one I put in my initial post and it will only allow lower/upper alpha characters as well as numbers between 0 and 9.
;) Can easily be extended to only check for nameservers and such … Note that this does not work in Windows/BSD systems, but the PEAR Net_DNS package can provide this for those platforms. Stepping around the validation issue for a minute, if a customer doesn’t want to give you a valid e-mail/domain is that someone you really want to be doing business with?
All the dns lookups or regular expressions aren’t going to save the customer from himself if he’s just stubborn from the start and puts in a “valid” but fake e-mail.