0

Getting the exception when validating the email using regular expression

Using the below line of code

.match("^[A-Z0-9._%+-]++@[A-Z0-9.-]++.[A-Z]{2,}+$")

enter image description here

Toto
  • 83,193
  • 59
  • 77
  • 109
  • 1
    It seems you didnt escape some characters like the double + Try using an online editor as most descripe issues in the syntax pretty good (https://regexr.com/) – TSH Feb 11 '20 at 07:30

1 Answers1

0

It's the extra "+"s. Have you tried

.match("^[A-Z0-9._%+-]+@[A-Z0-9.-]+.[A-Z]{2,}$")

P.S. you are only matching full-capital addresses without "a-z".

wwweagle
  • 303
  • 2
  • 9