- 身份證號碼隱藏
const cardNo = idCard.replace(/^(.{6})(?:\w+)(.{4})$/, "\$1********\$2")
- 手機號脫敏處理
const mobile = mobile.replace(/^(.{3}).*(.{4})$/, "\$1****\$2")
const cardNo = idCard.replace(/^(.{6})(?:\w+)(.{4})$/, "\$1********\$2")
const mobile = mobile.replace(/^(.{3}).*(.{4})$/, "\$1****\$2")