There is a regex in my project,and i am trying to understand what does it mean,so if any one can help me out
/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$/
and
/^(?=.*[0-9])(?=.*[a-zA-Z])([a-zA-Z0-9]+)$/
In first I know the first one ,but what does (.[_a-z0-9-]+)* this is doing and what does this do (.[a-z0-9-]+)*(.[a-z]{2,4})$
and in second what does this ?= is doing in this expression
$("#mailId").change(function(){
var m=$("#mailId").val();
var mailRegex=/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$/;
if(m=="")
$("#errMail").html("MailId can't be empty.");
else if(m.match(mailRegex))
$("#errMail").html("");
else
$("#errMail").html("MailId is not valid.");
});