i'm having a regex that is allowing only Latin letters and numbers and allows the symbols @
, _
and .
. The final requirement is that it must contain at least one Latin letter.
My regex is this:
const regTest = /^([0-9A-Za-z_@.])+$/g;
i'm having a regex that is allowing only Latin letters and numbers and allows the symbols @
, _
and .
. The final requirement is that it must contain at least one Latin letter.
My regex is this:
const regTest = /^([0-9A-Za-z_@.])+$/g;
You may also try with the usage of positive lookahead:
^(?=.*[a-z])[\w@\.]*$
Use with ignore case flag.