js mobile phone number with * number processing

 

var tells = '手机号码'
var tell = /(\d{3})\d*(\d{4})/;
phone = tells.replace(tell, '$1****$2')
console.log(phone);

 

Guess you like

Origin blog.csdn.net/weixin_43101671/article/details/114119267