Android mobile phone number, car brand regular expression Encyclopedia _ regular expression

Source: Internet
Author: User

Mobile phone number

Mobile phone name has GSM: said only support China Unicom or mobile 2G (130, 131, 132, 134, 135, 136, 137, 138, 139, 145, 147, 150, 151, 152, 155, 156, 157, 158, 159, 182, 185, 186, 187, 188)

Mobile phone name has CDMA: only support China Telecom 2G segment (133, 153, 180, 181, 189)

The name of the mobile phone has WCDMA/GSM: support China Unicom or Chinese mobile 2G, and China Unicom 3G segment (130, 131, 132, 134, 135, 136, 137, 138, 139, 145, 147, 150, 151, 152, 155, 156, 157, 158, 159, 182, 183, 185, 186, 187, 188), do not support mobile 3G business, do not support the telecom card.

The name of the mobile phone has TD-SCDMA/GSM: support China Unicom or mobile 2G, as well as Chinese mobile 3G segment (130, 131, 132, 134, 135, 136, 137, 138, 139, 145, 147, 150, 151, 152, 155, 156, 157, 158, 159, 182, 183, 185, 186, 187, 188, do not support unicom 3G business, do not support the telecom card.

Mobile phone name has CDMA2000/CDMA: Support China Telecom 2G segment, as well as China Telecom 3G segment (133, 153, 180, 181, 189), does not support mobile Unicom card

Mobile phone name has cdma2000/gsm (dual-mode): A card to support China Telecom 2G, as well as China Telecom 3G segment (133, 153, 180, 181, 189), another card to support China Mobile or the 2G section of Chinese unicom voice and SMS functions.

Third-party operator's number 170th code segment

Add: Unicom 4G 176, telecom 4G 177, Mobile 4G 178th segment

The regular expression functions written according to these are as follows:

 public static Boolean Ismobileno (String mobiles) {
     string telregex = ' \\d{}|[] \\d{}| []\\d{}| []\\d{}| []\\d{} ";
     if (Textutils.isempty (mobiles)) return false;
     else return mobiles.matches (Telregex);
   }

which

"13\\d{9}" means the first two digits are 1 and 3, followed by any 9 digits;

"14[57]\\d{8}" means the first two digits are 1 and 4, the third digit is 5 or 7, followed by any 8 digits;

Analogy

Car brand

The regular expression of the license plate has been on the internet for a long time and has not changed much:

 public static Boolean Iscarnumberno (String carnumber) {/
     *
     license plate number format: Kanji + A-z + bit-A-Z or-
     (includes only the common license plate number, Coach car and some of the military vehicle grades are not included)/
     String carnumregex = "[\ue-\ufa]{}[a-z]{}[a-z_-]{}";
     if (Textutils.isempty (Carnumber)) return false;
     else return carnumber.matches (Carnumregex);
   }

Of course, this regular expression has limitations, such as the first limit is only Chinese characters, not limited to only 34 provinces of Chinese characters abbreviation; the license plate number does not exist the letters I and O, prevents and 1, 0 confuse, some license plate cannot distinguish and so on.

The above content is this article to introduce the Android mobile phone number, car brand regular expression encyclopedia, hope to everyone useful.

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.