def isphonenumber (text): #固定电话 If len (text)! =: return False # The number of bits is not enough for I in range (0, 4): if n OT Text[i].isdecimal (): return false # area code not if TEXT[4]! = '-': return False # no split symbol for I in Range (5, +): if not Text[i].isdecimal (): return False # detect phone number body is not a number return True # "text" is a
@author: Zzq@software: Pycharm@file: lettercombinations.py@time: 2018/10/18 18:33Requirement: Given a string containing only the number 2-9, returns all combinations of letters that it can represent.The mapping of numbers to letters is given below (same as the phone keys). Note that 1 does not correspond to any letters.2:ABC; 3:def; 4:ghi; 5:JKL; 6:mno; 7:PQRS; 8:TUV; 9:wxyzInput: "23"Output: ["ad", "AE", "
SQL Injection on a site of Shanda game may cause leakage of the IP addresses and mobile phone numbers of current database users
Shanda game was injected again, and its permissions were not high enough to query its own tables. You can see the IP address and mobile phone number when the user is activated.
Injection address:
http://blood.sdo.com/NewsApp/GetVoteInfo.
JQuery uses regular expressions to verify mobile phone numbers, email addresses, ID cards (including Hong Kong, Macao and Taiwan), and jquery Regular Expressions
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 verification in the
calls), such as in China or Europe is generally 00, and in North America is 1,gsm 00 and 1 made a mark directly with "+" to replace, This can be identified by operators in areas that support the GSM format. Because the operator is doing this call transfer service. CDMA I haven't thought about it yet.Google as a global company to provide a libphonenumber jar package, on GitHub has its open source project, introduced a variety of formats, easy to use. You can also do things together with the SIM
Code
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->
//
VaR Reg =/^ (\ D +) | ([A-Z] +) $/g filters out one or more numbers from the beginning to the end, or one or more 26 letters
//
VaR reg2 =/^ [\ u4e00-\ u9f5a] + $/g; filter out one or more Chinese characters from the beginning to the end.
//
VaR reg3 =/^ \ D {1, 3} $/g; filter numbers ra
in ASP. NET MVC, you can use the RegularExpression feature to verify your phone number. public class Customer { [Required (errormessage = "required")] [Display (Name = "phone number")] [RegularExpression (@ "^1[3458][0-9]{9}$", errormessage = "Cell phone number is not formatted correctly")] public string PhoneNumber {get; set;}
in ASP. NET MVC, you can use the RegularExpression feature to verify your phone number. Public class Customer { [Required (errormessage = " required ")] [Display (Name = " phone number ")] [RegularExpression (@ "^1[3458][0-9]{9}$", errormessage = " cell phone number is not formatted correctly ")] Public string Get set; } }I
ways to separate names and phone numbers using Excel functions
Example: As shown in the following illustration, the contents of column A are required to be split into columns B and C.
Analysis: Chinese characters are double-byte, while letters and numbers are single-byte. In Excel functions, a class of functions with B, such as the LEFTB,RIGHTB,MIDB,SE
If (! Preg_match ( #039; 0? (00 | 01 | 11 | 13 | 14 | 15 | 17 | 18) [0-9] {9} #039;, $ tel )) {code ...} why can I use this regular expression for mobile phone numbers with more than 11 digits without reporting errors? 00 and 0111 are customized and ignored. the regular expression is not very good. Where can I write it wrong? How should I write it? if (! Preg_match ('/0? (00 | 01 | 11 | 13 | 14 | 15 | 17 |
There are always a lot of text boxes that prohibit non-Numeric Character Input. For example, if the mobile phone number has a zip code, the following describes how to prohibit it. Interested friends can learn about it at work, there are always a lot of text boxes that prohibit non-numeric characters from being entered, such as mobile phone numbers.
The Code i
Verify the phone number's regular: (\d{3}-) (\d{8}) $| (\d{4}-) (\d{7}) $| (\d{4}-) (\d{8}) $(The phone number here is a modern number)Verify the regular mailbox:\w+ ([-+.] \w+) *@\w+ ([-.] \w+) *\.\w+ ([-.] \w+) *\w any case English letter 0-9 digit underline + to appear at least 1 characters[-+.] \w+ any containing-+. And the combination of \w characters appears 0 or more times@ Fixed Symbol\w+ at least 1
Added verification for mobile phone numbers starting with 158 and 159.
CopyCodeThe Code is as follows: // remove the spaces at the beginning and end of the string
String. Prototype. Trim = function (){
VaR M = This. Match (/^ \ s * (\ s +) *) \ s * $ /);
Return (M = NULL )? "": M [1];
}
// Verify the valid mobile phone number
String. Prototype. ismobile =
extends:http://blog.csdn.net/wx_962464/article/details/8471195In fact, this is very simple, in Android has been implemented for us, but I guess a lot of people do not know. including me. So write it down for everyone to see and learn.The core is to add a property in the TextView, add android:autolink= "Email|phone|web" so our program will proactively identify our email address, our phone number, as well as
Determine if the mailboxjquery verifies that the mailbox function Checksubmitemail () {if ($ ("#email"). val () = = "") {//$ ("#confirmMsg"). HTML ("Determine if the phone number isjquery verifies that the mobile number function Checksubmitmobil () {if ($ ("#mobile"). val () = = "") {alert ("mobile phone number cannot be empty!") ");//$ (" #moileMsg "). HTML (" JavaScript helper Methods Series: (1) Use regu
Preface
When reading the address book of the Android system, the contacts are generally read first and then their numbers are read in a nested loop. If the number of contacts in the address book is small, the speed is acceptable, but the number of people in the address book is 1 to 2, I am afraid it will be slow. If the hardware is almost worse, the experience will be worse. AvailableContactsContract. CommonDataKinds.
Python supports vertical printing of leaflets, which can be easily torn by mobile phone numbers, and python
Python 2.7 is a beginner and the code is relatively simple.
NumPrinter. py
Copy codeThe Code is as follows:#! /Usr/bin/env python#-*-Coding: UTF-8 -*-'''@ Author: Quico Tomy@ Function: Input a phone number and print by line@ Demo Time: 2015-3-16'''Numstr
Added verification for mobile phone numbers starting with 158 and 159.Copy codeThe Code is as follows:// Remove spaces at the beginning and end of the stringString. prototype. Trim = function (){Var m = this. match (/^ \ s * (\ S + (\ s + \ S +) *) \ s * $ /);Return (m = null )? "": M [1];}// Verify the valid mobile phone numberString. prototype. isMobile = funct
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.