+ 7
[Solved] Why doesn't the following Regular Expression detect '.'?
I am trying to validate email input using the REGEX as follows: /^[a-z][a-z0-9]+@[a-z]\./ For some reason i have issues with detecting the dot in the string..Can anyone help me with the correction. i know it's quite basic REGEX but i'm still practicing REGEX..
4 ответов
+ 6
$hardul B after \. [a-z]{2,3}$ this was missing. It is necessary to put because we write com, in, co after dot (.) and also here the size of String maybe be 2-4 after dot(.) so we need to use {2,4}. Here $ used to match the String
+ 4
Brief description is given here. Might be it can help to understand
https://www.google.com/amp/zparacha.com/validate-email-address-using-javascript-regular-expression/amp
+ 3
AJ Anant
Thank you.. It works..
But can you guide me with the mistake in my REGEX ..
+ 3
AJ Anant Just a correction $ is for end of the string! 👍 Thanks!