validating email address using regular expression on razor page

后端 未结 3 2284
孤城傲影
孤城傲影 2021-02-20 10:39

Hi I am using razor and trying to use regular expression to validate email address here the validation function

function validateEmail(txtEmail){
   var a = doc         


        
3条回答
  •  我在风中等你
    2021-02-20 11:11

    Unicode may work like this

    string filter = "/^[a-zA-Z0-9_.-]+\\u0440[a-zA-Z0-9]+[a-zA-Z0-9.-]+[a-zA-Z0-9]+.[a-z]{0,4}$/";
    

    Alternatively in razor @@ is a normal @ symbol, it should work in your javascript.

    string filter = "/^[a-zA-Z0-9_.-]+@@[a-zA-Z0-9]+[a-zA-Z0-9.-]+[a-zA-Z0-9]+.[a-z]{0,4}$/";
    

提交回复
热议问题