Greetings to all who have entered
Actually there are a million regulars on the Internet. Suit so-so. Pristavte you need to check the 'name'. Well, let's say There must be at least 2 characters in English.
The person wanted to enter - 'my', and entered - 'm.y'. Regular eats, but will not find anything. Is it possible to get only letters at the output in a variable? and check them out 2 or more? ('my' .. user friendly so to speak)
Well, or take an email. It's more fun. Suppose a person wants to enter email123@site.ru, and entered - email123@siYte.ru. I don `t know the worker is an email or not. And to hell with him. Yes, and the user is not necessarily a cracker. But let's say you need to forgive a fool, and get a variable with a processed email at the output, and check it out already.
those. how to do:
переменная -> выкидываем_лишнее -> if(регулярка ?){все_ок}else{что_то_не_так} ?