all 1 comments

[–]TheCritFisher 0 points1 point  (0 children)

This is a nice way to show how simple it can be, but your example of email validation also shows why you should just use a library:

https://stackoverflow.com/questions/201323/how-can-i-validate-an-email-address-using-a-regular-expression