Js regular line hides the phone number mask phone number

// The middle 4 of the hidden phone number is:
'18812345678'.replace(/(\d{3})(\d{4})/, '$1****')
Result: 188****5678

// The 4 at the end of the hidden phone number is:
'18812345678'.replace(/(\d{4})$/, '****')
Result: 1881234****

 

Permalink:  http://qiaolevip.iteye.com/blog/2171596

Preview article: Angularjs / js regular format bank card number

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326525447&siteId=291194637