I need a regex which will allow only A-Z, a-z, 0-9, the _ character, and dot (.) in the input.
I tried:
[A-Za-z0-9_.]
But, it did not work. How can I fix it?
I need a regex which will allow only A-Z, a-z, 0-9, the _ character, and dot (.) in the input.
I tried:
[A-Za-z0-9_.]
But, it did not work. How can I fix it?
For me, i was looking for a regex like Gmail has, should allow a-z, A-z, 0-9, _, . only here is the Yup format for it i used:
Email: Yup.string()
.email("Please Provide Valid Email")
.matches(
/^\w+([.-]?\w+)*@\w+([.-]?\w+)*(.\w{2,3})+$/,
"Only a-z A-Z _ . 0-9 are allowed in this Field"
)