身份证保留前6位和后两位其它用*号代替

news/2024/7/10 0:11:58 标签: vue
idNum.replace(/(\w{6})\w*(\w{2})/, '$1**********$2')
示例

在这里插入图片描述


http://www.niftyadmin.cn/n/1367719.html

相关文章

elemet ui 时间区间不可超过1年

<el-form-item prop"dateArea" label"交易时间&#xff1a;"><el-date-pickertype"date"placeholder"选择开始日期"v-model"ruleForm.dateArea1"></el-date-picker><span style"margin: 0 5px;&q…

Vue全家桶构建项目

步骤一、安装vue-cli 首先&#xff0c;我们可以通过npm安装vue-clic,前提是我们需要有node环境&#xff0c;如果电脑还没安装node&#xff0c;先安装&#xff0c;可通过 node -v 查询node的版本号&#xff0c;有版本号则已经安装成功&#xff1b; vue全家桶项目构建教程 接下…

Vue下载文件不成功及下载文件名称问题

看代码 import axiosDown from "axios";downloadFile(path) {return axiosDown({url: path,method: "get",responseType: "blob" // 这一步也很关键&#xff0c;一定要加上 responseType 值为 blob});},downloadWay(item) {// console.log(item…

js代码优化

1.避免多条件并列 let status process; let arr [process, wait, fail] if (arr.includes(status)) {console.log(避免多条件并列--2);}

C++ day44

1、全局变量&#xff0c;int monster 10000;定义英雄类hero&#xff0c;受保护的属性string name&#xff0c;int hp,int attcKk;公有的无参构造&#xff0c;有参构造&#xff0c;虚成员函数void AtK()[blood-0,}&#xff0c;法师类继承自英雄类&#xff0c;私有属性int ap_at…

JS大坑之17位(含)以后的Number类型数值精度丢失问题

1.JS大坑之17位&#xff08;含&#xff09;以后的Number类型数值精度丢失问题 console.log("1318855614830125158")console.log(Number("1318855614830125158"))console.log(parseInt("1318855614830125458"))console.log(String(13188556148301…

js 数组及对象数组去重

一. 对象数组去重 1.es6方法 new Map() function quChong() {let arr [{id: 1,name: 111},{id: 1,name: 111},{id: 2,name: 222},{id: 3,name: 333}];console.log(arr);console.log(--------------------);let arr1 unique(arr);console.log(arr1);};function unique(arr) {…

vue-element-table 表头错乱问题及过滤器失效问题

1.问题描述&#xff1a;table使用时候 动态控制表头 v-if的时候表头错乱,没有安装代码的顺序显示 解决方法&#xff1a;加key, :key“Math.random()” 2.列表的数据需要过滤时&#xff0c;会出现过滤器失效情况&#xff0c;也可用该办法 <el-table-columnlabel"提货…