In Linux, regular expressions, regular expressions, and string expressions are classified into basic regular expressions and extended regular expressions based on different levels of rigor. Next, let's look at basic Regular Expressions: Some frequently used symbols [; alnum:] represents 0-9 a-z A-Z [: alpha:] represents a-z A-Z [: lower:] represents a-z [: upper:] represents A-Z [: digit:] it indicates 0-9 www.2cto.com. Before learning regular expressions, it is necessary to know grep usage grep [-A] [-B] [-- color = auto] 'query string'. filenameA can be followed by numbers., in addition to listing this row, a number can be added after Column B in the n industry. This is the meaning of before, except for listing and modifying rows, the previous n industries are listed in the English section for a regular expression exercise: "Open Source" is a good mechanic to develop programs. app Le is my favorite food. football game is not use feet only. this dress doesn' t fit me. however, this dress is about $3183 dollars. ^ MGNU is free air not free beer. ^ MHer hair is very beauty. ^ MI can't finish the test. ^ MOh! The soup taste good. ^ Mmotorcycle is cheap than car. This window is clear. the symbol '*' is represented as start. Oh! My god! Www.2cto.com The gd software is a library for drafting programs. ^ MYou are the best is mean you are the no. 1.The world <Happy> is the same with "gglad ". I like dog. google is the best tools for search keyword. goooooogle yes! Go! Go! Let's go. # I am VBird (downloaded from laruence's private kitchen). There are 22 lines in this file, and the bottom line is blank. Now let's start a Case Study. Case 1: Find the lines containing
Case 2: Search for rows without
Case 3: rows containing the 'or''
Case 4: Find the rows that contain test and taste, and carefully analyze the requirements. test and taste both contain t s, and t www.2cto.com. Case 5: Find the rows that are not g before oo.
Case 6: Search for rows containing numbers
Case 7: Search for rows starting with lowercase letters
Case 8: the end of the trip is the decimal point.
Case 10: Search for blank rows in the expression. represents any character * indicates that the previous character has been repeated for 0 or multiple times. * This means that any character is repeated for any number of times, including 0 explanations. The last knowledge point is limited to the range of consecutive characters {} case 11: Search for rows with 2 to 5 consecutive zeros: www.2cto.com
Basic regular expression character ^ word: string to be queried at the beginning of the row wrod $ string to be queried at the end of the row * repeat 0 to infinite number of the first character [list] From the character set and find the desired character [^ list] From the character set find out the string range \ {m, n \} The author yuanzeyao2008 from m to n consecutive times