I tried to allow input either Chinese or Alphabetic Character.
var name="TEXT" //here input either alphabetic or Chinese Characters 请输入 let reqChinesePos=/^[\u3000\u3400-\u4DBF\u4E00-\u9FFF]\d{8}$/; let reqEnglish=/^[A-Za-z]\d{40}$/ console.log(reqEnglish.test(name)); //Here true but here also Chinese characters also match. console.log(reqChinesePos.test(name)); //Here true but here also alphabetic characters also match.
Expected result :
console.log(reqEnglish.test(name));//here only allow alphabetic characters not allow chinese.
console.log(reqChinesePos.test(name));//here only allow Chinese characters not allow English.