当前位置:网站首页>Hide the middle digit of ID number
Hide the middle digit of ID number
2022-07-24 19:44:00 【Crawling Oriole】
I met a problem when writing Alipay applet today , ID number needs to be hidden , Do the following :
String s = "37011219810228316X";
String a = "";
if (s.endsWith("X") || s.endsWith("x")){
a = s.substring(0,1)+"****************X";
}else {
a = s.replaceAll("(\\d{1})\\d{16}(\\d{1})", "$1****************$2");
}
System.out.println(a);
The output is as follows :
3****************X
ID number is divided into two categories , Class I contains ‘X’ Character , A kind of pure digital . Pure numbers can be regularized , contain ’X’ Characters are not good .
边栏推荐
- Biopharmaceutical safety, power supply and production guarantee
- Setting up a dual machine debugging environment for drive development (vs2017)
- Original reverse compensation and size end
- 拿捏C指针
- Create a life cycle aware MVP architecture
- MySQL final chapter
- pyhanlp安装教程
- Sword finger offer 50. the first character that appears only once
- 【无标题】
- Feature extraction tool transformer Bert
猜你喜欢

从服务器批量下载文件到本地

Elastomer simulation (elasticity)

Feature extraction tool transformer Bert

Machine learning_ Data processing and model evaluation

Literature reading: gopose 3D human pose estimation using WiFi

How to export map files tutorial
![[JVM learning 03] class loading and bytecode Technology](/img/b4/9482b02b58580171235fd4c36129e9.png)
[JVM learning 03] class loading and bytecode Technology

PostgreSQL Elementary / intermediate / advanced certification examination (7.16) passed the candidates' publicity

拿捏C指针

Stop using UUID indiscriminately. Have you tested the performance gap between self incrementing ID and UUID?
随机推荐
Getaverse, a distant bridge to Web3
Thread theory knowledge
Anaconda installs labelimg (super simple and available)
day 2
Detailed explanation of ELF format (I)
Qt| control qscrollbar display position
Reading notes: you only look once:unified, real time object detection
Onemanager and cloudflare workers deployment and installation - binding domain names and using cloudflare CDN acceleration
Techempower web framework performance test 21st round results release --asp Net core continue to move forward
871. Sum of divisors
Setting up a dual machine debugging environment for drive development (vs2017)
Create a life cycle aware MVP architecture
Duilib actual combat 1- imitate Baidu online disk login interface
【无标题】
[untitled]
Interface component devaxpress asp Net v22.1 - new office 365 dark theme
MySQL8.0学习记录20 - Trigger
Leetcode652 finding duplicate subtrees
Tupu software digital twin civil aviation flight networking, building a new business form of smart Civil Aviation
[face to face experience of school recruitment] 8 real questions of pointer interview. Come and test how many you have mastered.