Python Regular Expression tutorial 2: capture, python Regular Expression
Preface
In the previous article, we introduced the basics of Python regular expressions. In this article, we will summarize the usage of Regular Expressions for capturing. I will not talk about it below. Let's take a look at the detailed introduction.
Capture
Capturing and grouping are closely related to regular expressions. Generally, grouping is captured and completed with parentheses (therefore, parentheses are also spec
.
In addition, the Metro version of Skype for the user carefully designed a rich chat expression system, although compared to the QQ expression is not so rich, but you have seen such a fierce expression of HD?
In addition to instant chat, Skype also retains its most classic voice and video call functions, we simply click on the left-hand side of the conversation panel to call the phone with friends, the way there are two types of calls between Skype, the instant call,
); if (Everyname!=null) {while ( Everyname.movetonext ()) {/* Query phone number type, type 0 for landline phone, type 1 for mobile phone */int Type=everyname.getint ( Everyname.getcolumnindex (Phone.type)); if (type==phone.type_home) {log.i ("mainactivity", "landline phone" + Everyname.getstring (Everyname.getcolumnindex (Phone.number)));} else if (type==phone.type_mobile) {log.i ("mainactivity", "Mobile p
, String sjh,string zj) {flag=false; intIndex=sjh.lastindexof ("-"); if(! (sfz.length () = = -|| Sfz.length () = = -) ) {System. out. println ("the ID number must be 16-bit or 18-bit!"); } Else if(Sjh.length () One) {System. out. println ("mobile phone number must be 11 bit!"); }Else if(index!=-1index!=0index!=4zj.length ()! = -) {System. out. println ("The landline number must be 4-bit and the phone number must be 7!"); }Else{System. out. println
caused you trouble, you can think about it, what is your impression of a good and bad water heater? What's the impression of his manufacturer? Will you buy any more of his products? The water heater manufacturer loses a customer simply because one button has no light.
Let's give an example of a network of software products. About 2 years ago, almost everyone had such a bad experience when they registered with a website user, a lengthy form, you need to fill in the username, password, mobile ph
you can choose the customization to select the Office components you need, and modify the installation path of the program, such as custom effects, until the installation program is finished. At this point, you can open your own Office files, such as word text files or Excel spreadsheet files, and so on, will default to be opened by Office 2010, and the activation window will pop up when opened:
Please select the phone activation option, the leaf attempts direct networking activati
9. image_src– Photo address in the album is named, do not appear all kinds of img,image, Img_url,thumb_url and other head_thumb– user head, although a bit long, be sure to comply. Do not appear in the above situation image_alt– the alt attribute of the picture in the photo album desc– Description, Introduction, such as GOODS_DESC, do not appear goods_txt such details– details, article contents, etc. order_id– sort telephone– Landline number m
unit of the link layer is the frame, the protocol is different, the frame length and the interface also have the difference, but the frame must be bound at any rate.(3) sequential control, which refers to the control of the sequence of frames.
(4) Error detection and recovery
Network layer to establish network connectivity and provide services to the upper level
4. What is the difference between landline and cordless telephone? What you need to pay s
The examples in this article describe the various rules for JavaScript implementation validation. Share to everyone for your reference. as follows:
/** * Inspection of various rules * @param str Test content * @param cType default inspection rule string [* empty, check for null * telphone, landline phone number * Allphone, all mobile phone number * Ydphone, mobile phone number * Ltphone, Unicom mobile phone number * Dxphone, telecom mobile
Project requirements:
Enter the phone number, real-time judge the phone number entered the compliance with the rules:
If not, the Submit button is disabled, the mobile phone number information is not submitted, and the button displays a gray background;
If the rule is met, you can submit the phone number information you entered and set the button background to red.
The code is as follows:
Effect:
User input phone number is irregular:
When the user enters the phone number that ma
Tags: truncate. SQL Automatic color IMA interpretation system call imagesA Little StoryOne day, Xiao Wang is chatting with HR sister, is happy, suddenly received the system alarm message, the database disk is the remaining space 500m,omg, no, the disk is almost full, if the business to stop, then the small king can only delete the library to run,, First check, there are no files that can be deleted, the results are important or not in doubt. First shrink the database bar, click to run. When th
): attribute is not divided (1NF is an atomic constraint on a property, requiring that the attribute be atomic and non-decomposed) Name Tel Age Mobile Landline Josh 13612345678 021-9876543 22 Wang 13988776655 010-1234567 21 Obviously, tel This attribute can also be decomposed, broken down into mobile phones and landline these two properties, do not meet the first paradigm of the database, not the relationa
The pattern of three databases is certainly not unfamiliar. The official explanation is very abstract and it is difficult to understand who has just begun to learn. For this piece of knowledge, I will read it. It will be forgotten, forget to look again. Whenever people ask me, you must first look at the textbooks, think about a time to clarify. Why can't the classic idea of the three paradigm be uttered immediately when asked by others ? By listening to miss Rice's "How to study efficiently" Thi
the mobile phone number
This. ChkMobile = function (obj, msg)
{
If (IsError) return;
If (! (/^ (? : 13d | 159 )-? D {5} (d {3} | * {3}) $/. test (obj. value. Trim () ErrorHandle (obj, msg );
}
// Check the landline number
This. ChkPhone = function (obj, msg)
{
If (IsError) return;
If (! (/^ D {3, 4 }-? D {4, 5} (d {3} | * {3}) $/. test (obj. value. Trim () ErrorHandle (obj, msg );
}
// Submit a form event
This. Submit = function (Form, msg)
{
If (I
the mobile phone number
This. ChkMobile = function (obj, msg)
{
If (IsError) return;
If (! (/^ (? : 13d | 159 )-? D {5} (d {3} | * {3}) $/. test (obj. value. Trim () ErrorHandle (obj, msg );
}
// Check the landline number
This. ChkPhone = function (obj, msg)
{
If (IsError) return;
If (! (/^ D {3, 4 }-? D {4, 5} (d {3} | * {3}) $/. test (obj. value. Trim () ErrorHandle (obj, msg );
}
// Submit a form event
This. Submit = function (Form, msg)
{
If (I
: (\ d +) \. (\ d +)Extract the Chinese mobile phone number from the information: (86) * 0*13 \ d {9}Extracted Chinese landline numbers from the information: (\ d {3, 4} \) | \ d {3, 4}-| \ s )? \ D {8}Extract Chinese phone numbers (including mobile and landline phones) from the Information: (\ d {3, 4} \) | \ d {3, 4}-| \ s )? \ D {7, 14}Extracted Chinese zip code: [1-9] {1} (\ d +) {5}Chinese ID card numb
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.