I am trying to create an expression to validate Gmail addresses. That's what I've done so far.
^([\w]*[\w\.]*(?!\.)@gmail.com) I am trying to create an expression to validate Gmail addresses. That's what I've done so far.
But it isn't working as I want.
Gmail address:
- First and last character has to be [a-z0-9]
- The username contents only [a-z0-9.]
- There cannot be consecutive periods (i.e:
[email protected][This is wrong]) - There length of the username has to be between 6 and 30 letters.
Being honest I don't have much experience with the Regular Expressions.
By the way, is there a documentation for Regular Expression?
@has to be at least 6 alphanumeric (dots not included!) characters.+. The name portion and the "gmail.com" domain name are case-insensitive, so uppercase letters are permitted. I don't know all the rules. What is your actual goal? (It's hard to think of an application where you'd want to validate gmail addresses and only gmail addresses.)