showing results for - "how to use regex in jquery"
Elena
20 Jun 2018
1jQuery(function () {
2    $(".mail").keyup(function () {
3        var VAL = this.value;
4
5        var email = new RegExp('^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$');
6
7        if (email.test(VAL)) {
8            alert('Great, you entered an E-Mail-address');
9        }
10    });
11});
12