javascript - How to customize regular expression which let user can input number from zero to nine? -
i have below regular expression email validation want customize regular user can input number 0 nine.
example: heng18374sopheak@yahoo.com, 12948sopheak@yahoo.com, sopheak876@gmail.com
here email validation let user input character can't input number
this email validation regular expression avoid user input number (0-9) want user can input number(0-9).so how customize below regular expression?
/(^[a-z]([a-z_\.]*)@([a-z_\.]*)([.][a-z]{3})$)|(^[a-z]([a-z_\.]*)@([a-z_\.]*)(\.[a-z]{3})(\.[a-z]{2})*$)/i
but want customize code let user input number 0 nine.
thanks help
/(^[a-z-0-9]([a-z_\.0-9]*)@([a-z_\.]*)([.][a-z]{3})$)|(^[a-z]([a-z_\.]*)@([a-z_\.]*)(\.[a-z]{3})(\.[a-z]{2})*$)/i
simply add 0-9
pattern.
Comments
Post a Comment