Regular expression for validating web site address
Here is my usecase: A user can create a product where one of the fields (attrs) is the product website_url.
NET web forms project and copy the pattern into my project. NET as in the framework itself that has it wrong, rather it’s the default value Visual Studio provides when selecting the expression above) Now you can read the spec and get a headache or you can take a look at Wikipedia’s description of the “local part” of an email address: The third bullet says dashes are good – what gives?! At the end of the day, being too liberal is probably not a bad thing – is it really so bad if someone registers with an invalid address? On the other hand, being too stringent can mean losing a customer which is probably a whole lot worse.Here is the code to validate email address in Java Script using regular expression.