Sometimes in order not to let the user's mobile phone number and ID card directly exposed to the page, we need to add an asterisk processing, the general situation is in the middle of the position with a few asterisks, the specific code can refer to the following:
var str= ' 13155555555 ';var str2 = str.substr (0,3) + "* * *" +STR.SUBSTR (7); 131****5555
The si
Regular Expression (including Hong Kong, Macao and Taiwan) and jQuery Regular Expression for verifying mobile phone number email ID card
I have never used the regular expression verification system. I made a demo this time and used it all at once. I will take it directly next time.
The following code uses JQuery for verification on the page, and is also used for
This article is to share the simple implementation of the mobile phone number of the bank card synchronization display function, interested in small partners can see
Simple implementation of the mobile phone number card synchroni
Regular expressions (regular expression) are an object that describes the character pattern. Use regular expressions to perform powerful pattern matching and text retrieval and replacement functions. ID Card Regular: Identity card Regular expression (15-bit) isidcard1=/^[1-9]\d{7} ((0\d) | ( 1[0-2]) (([0|1|2]\d) |3[0-1]) \d{3}$/;//ID Regular expression (18-bit) isidcard2=/^[1-9]\d{5}[1-9]\d{3} ((0\d) | ( 1[
In php, replace the characters at the specified position in the string with asterisks. our function can be used to implement substr, preg_replace, substr_replace, and so on. I will respectively assign these three functions
In php, replace the characters at the specified position in the string with asterisks. our function can be used to implement substr, preg_replace, substr_replace, and so on. below we will introduce one instance for the three functions respectively, we mainly talk about the
In php, replace the characters at the specified position in the string with asterisks. Our function can be used to implement substr, preg_replace, substr_replace, and so on. Below we will introduce one instance for the three functions respectively, we mainly talk about the phone number and ID card.
Replace the phone
JS mobile phone number, zip code, area code, ID card Verification program
Mobile phone Number Inquiryfunction Checkmobile () {var smobile = Document.mobileform.mobile.valueif (!) ( /^13[0-9]d{4,8}$/.test (Smobile))) {Alert ("Please enter your mobile
China is so big, so many people, almost a mobile phone. The mobile phone number has been registered as an account of the major Internet stations. Similarly, the identity card is more so. The following is a valid mobile phone number
This paper introduces a very convenient tool to view SIM card information of mobile phone, and can easily view serial number information such as IMSI on the phone.1. This software can be found on the official website of the stone-cut simulator, found and installed in the Baidu Web-disk link below the stone-cut simulati
Replace the phone number string with the asterisk code: The code is as follows:Copy code $ Str = "15832818835 ";Echo substr ($ str,). '*****'. substr ($ str, 8, strlen ($ str); // retain the first and last three digits?>Or use regular expressions.$ S = 'manager Wang of www .111cn.net: 13999312365 manager Li: 13588958741 ';$ S = preg_replace ('# (d {3}) d {5} (d {3 })#',
Now start to deal with the logic of each navigation page, first look at the second navigation page
Here you need to implement the ability to bind the SIM card serial number, and note that the appropriate permissions are added: Uses-permission android:name= "Android.permission.READ_PHONE_STATE"
Private Settingitemview Siv_sim_bound;
@Override protected void OnCreate (Bundle savedinstancestate
Function checkform1 (){
If (form1.username. value = ""){Alert ("name cannot be blank! ");Return false;}If (! Iscardname (form1.username. Value )){Alert ("name error! ");Return false;}If (form1.usercode. value = ""){Alert ("ID card number cannot be blank! ");Return false;}If (! Isidcard (form1.usercode. Value )){Alert ("Incorrect ID card
Regular expressions (regular expression) are an object that describes the character pattern. Use regular expressions to perform powerful pattern matching and text retrieval and replacement functions.ID Card Regular://身份证正则表达式(15位)isIDCard1=/^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$/;//身份证正则表达式(18位)isIDCard2=/^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{4}$/;身份证正则合并:(^\d{15}$)|(^\d{17}([0-9]|X)$)The latest mobile
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.