A brief discussion on the solution to changing C# mobile phone number to 111XXXX1111
As shown below:
String subStr=(3,4); = (subStr,"****"); /// <summary> /// Replace the four digits in the middle of the mobile phone number as * /// </summary> /// <param name="phoneNo"></param> /// <returns></returns> protected string ReturnPhoneNO(string phoneNo) { Regex re = new Regex("(\\d{3})(\\d{4})(\\d{4})", ); phoneNo = (phoneNo, "$1****$3"); return phoneNo; }
The above article briefly talks about changing C# mobile phone number to 111XXXX1111 This solution to the display is all the content I share with you. I hope you can give you a reference and I hope you can support me more.
Related Articles
A simple keyboard recorder based on C#
This article will use C# language and HOOK technology to make a keyboard recorder to see how many times we clicked the keyboard in the past day and which keys are used the most frequently. Interested friends can try it.2022-08-08C# program ultimate debugging implements Windbg time travel
This article mainly introduces a detailed explanation of the time travel example of the ultimate debugging of C# program to implement windbg. Friends in need can refer to it for reference. I hope it can be helpful. I wish you more progress and get promoted as soon as possible to get a salary increase as soon as possible.2022-06-06C# generic collection type implementation add and traversal
This article introduces the methods of adding and traversing C# generic collection types, and the article introduces it in detail through sample code. It has certain reference value for everyone's study or work. Friends who need it can refer to it.2022-08-08Detailed explanation of QR code generation factory
This article mainly shares the docking codes of 3 free QR code interfaces and the points and differences obtained from testing. It has good reference value, let's take a look at it if you need it2016-12-12C# calculates the corresponding Monday and Sunday instance code from the current date
This article introduces the example code for C# to calculate the corresponding Monday and Sunday from the current date. Friends who need it can refer to it.2013-09-09C# Winform prohibits users from adjusting the column width of ListView
When using ListView, sometimes we don’t want others to adjust the column width at will, or the column width of certain columns, so as to achieve aesthetics, or hide data. Then we can use the code to achieve it.2011-05-05Analysis of simple packing operation examples in C#
This article mainly introduces the simple packing operation in C#, and analyzes the concept, usage and usage techniques of packing operation in C#. It has certain reference value. Friends who need it can refer to it.2015-04-04Detailed explanation of how C# uses crawler technology to achieve quick rental housing
As a coder, most of them are concentrated in first- and second-tier cities, so renting a house is inevitable. Faced with the various rental information today, it is often difficult to find a suitable house. This article teaches you how to use crawler technology to achieve quick rental housing. If you are interested, you can learn about it.2022-09-09Detailed explanation of the usage of the essential stack of C# collections
This article explains in detail the usage of the stack of the essence of C# collections, and the article introduces it in detail through sample code. It has certain reference value for everyone's study or work. Friends who need it can refer to it.2022-08-08Unity UGUI's ToggleGroup option component introduction
This article mainly introduces the examples of the ToggleGroup option component of Unity UGUI. Friends in need can refer to it for reference. I hope it can be helpful. I wish you more progress and get a promotion as soon as possible.2023-07-07