I have regex
/^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,4})+$/
for checking valid Email. It works, but GitHub's code scanner shows this error
This Part of the Regular Expression May Cause Exponential Backtracking on Strings Starting With 'A@a' and Containing Many Repetitions of 'A'.
I got the error, however, I'm not sure how to solve it.