Home>

phone number

The name of the mobile phone is gsm:it only supports China Unicom or China Mobile 2g number segment (130, 131, 132, 134, 135, 136, 137, 138, 139, 145, 147, 150, 151, 152, 155, 156, 157 , 158, 159, 182, 185, 186, 187, 188)

Phone name with cdma:it only supports China Telecom 2g (133, 153, 180, 181, 189)

The mobile phone name has wcdma/gsm:it means that it supports China Unicom or China Mobile 2g segment, 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), does not support mobile 3g services, and does not support telecommunications cards.

The name of the mobile phone is td-scdma/gsm:it means that it supports China Unicom or China Mobile 2g section, and China Mobile 3g section (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), does not support China Unicom's 3g service, and does not support telecommunications cards.

Phone names are cdma2000/cdma:they support China Telecom 2g and China Telecom 3g (133, 153, 180, 181, 189), and do not support mobile Unicom cards

The name of the mobile phone is cdma2000/gsm (dual-mode dual-standby):it means that one card supports China Telecom 2g section and China Telecom 3g section (133, 153, 180, 181, 189), and the other card supports China Mobile or Voice and SMS functions of China Unicom's 2g segment.

170th band of third party operators

Supplement:Unicom 4g 176, Telecom 4g 177, Mobile 4g ​​178

The regular expression functions written based on 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);
   }

among them:

"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;

And so on.

number plate

Regular expressions for license plate numbers are always available online,Not much changed:

public static boolean iscarnumberno (string carnumber) {
     /*
     License plate format:Chinese + a-z + a-z or-
     (Includes only common license plate numbers.
License plate numbers of coaches and some military vehicles 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,For example, the first character is limited to Chinese characters.There is no limit to only 34 provincial Chinese character abbreviations;The letters i and o do not exist on the license plate number to prevent confusion with 1, 0;some license plates cannot be distinguished and so on.

The above content is an introduction to the regular expressions of mobile phone number and license plate number in android.hope its good for U.S..

  • Previous Java implementation of input and output stream code sharing
  • Next Android regular expression