Therefore, we need to clarify how many number segments have been opened. The country number segments are allocated as follows:Mobile: 134, 135, 136, 137, 138, 139, 150, 151, 157 (TD), 158, 159, 187, 188China Unicom: 130, 131, 132, 152, 155, 156, 185, 186China Telecom: 133, 153, 180, 189 (1349 Weitong)Now we can test the regular expression matching,Import java. io. IOException;Import java. util. regex. Match
Package com.yuninfo.util; /** * Get mobile operator * Classname:mobileutil * Description:todo * @author Lizheng * @param args * @date May 30, 2012 8:58: AM * * @version/public class Mobileutil {/** * To determine the number of incoming parameter numbers for which operator * @param mobile * @return Operator Name * * * Public
static string Validatemobile (String mobile) {string returnstring= ""; if (Mobile==null | | Mobile.trim (). Length ()!=11) {re
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.