Now, the mobile phone number and the license plate number are all written before.
Now the phone number has been updated by 177, 147 and so on.
So, the mobile phone number can be perfected a bit:
public static Boolean Checkmobilephone (String mobilephone) {return (Mobilephone==null | | mobilephone.equals ("") | |! Mobilephone.matches ("^ (13) | ( 14) | (15) | (17) | (18)) \\d{9}$ "));}
Moreover, I specifically looked at the car grade of the regular, found that there is a small problem.
public static Boolean checkshopsign (String shopsign) {return (Shopsign==null | | shopsign.equals ("") | |! Shopsign.matches ("^[\u4e00-\u9fa5]{1}[a-z]{1}[a-z_0-9]{5}$"));}
Overall is not much of a problem,just because [\u4e00-\u9fa5] is a match for a Chinese character, so when the Chinese character is not a province abbreviation, but other Chinese characters, it can also be verified by
For example: "I A12345" such a license plate number can also be matched through. Have thought about the solution, but feel that the abbreviation of 34 provinces is very troublesome to match, there is no good way
Just the programmers, when copying the online regular, take care of it.
Perfect: Regular expressions for mobile phone numbers and car grades on the Internet