How can I update the following regex to allow all special characters except "@" in the email handle.
"[a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\\.+[a-z._-]+"
You can use:
^[^@]+@[a-zA-Z0-9._-]+\\.+[a-z._-]+$
[^@]+ will match 1 more of anything but @
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With