The operator

^1[3-9](\d{9})$^: matches the beginning of the string. If ^ is used in the list operator and is first, it represents invert. []: matches only one character in brackets (): The grouping/capture group defines a subexpression \d: represents0-9Number {}: Matches the previous element several times$: matches the end of the string.: matches all characters except newline andnull*: matches the previous element0More or more +: matches the previous element1One or more times? : matches the previous element0Time or1{count} : before the match an element count time {min,} : before A matched elements at least min {min and Max} : an element at least min before match, matching up to the Max time | : an expression before or after an expression [A - Za - z0 -9]: alphanumeric characters A-ZA-z]: alphanumeric characters [\t]: space and TAB][!"# $% & '() * +,. / :; The < = >? @ \ ^ _ ` {|} ~ -] : punctuation [\ r \ n \ n \ \ t f] : white space characters [A - Fa - f0-9] : hexadecimal character \ w, \ d of Numbers and letters: digital \ w: in addition to the Numbers and letters \ B: in addition to digital \ matching to the beginning of the string \ > < : : Matches the end of the stringCopy the code

grep

Grep -e "description(.*)[\"]$" -v: reverse display -i: ignore case. -A: display several lines up. -b: display several lines downCopy the code

The sample

$grep "TG" swift $grep "TG" swift -a 1 $grep "TG" swift -a 1 -B 1 $grep "tgteacher Swift -v $grep "TGTeacher" swift -v $grep "TGTeacher[^s]" swift $grep "oo" swift $grep "[^a-z]oo $grep "[^ [: lower:]] oo" the definition of the variables. Swift $grep "oo" [^ A Za - z] the definition of the variables. Swift $grep "[0-9] oo" the definition of the variables. Swift $grep "[^ A - Za - z0-9] oo" Swift $grep "\woo" swift struct TGTeacher {let name: String let class: String let credit:String let description: String } struct TGTeachers { let name: String let class: String let credit:String let description: String } extension TGTeacher { static var all: [TGTeacher] {[TGTeacher (name: "Cooci license:" http://creativecommons.org/licenses/by-sa/3.0 ", credit: "http://commons.wikimedia.org/wiki/User:Lin%C3%A91", description: "Basil is commonly used fresh in cooked recipes. In general, it is added at the last moment, as cooking quickly destroys the flavor. The fresh herb can be kept for a short time in plastic bags in the refrigerator,  or for a longer period in the freezer, after being blanched quickly in boiling water. The dried herb also loses most of its flavor, and what little flavor remains tastes very different.9oo *oo" ), TGTeacher( name: "Kody", license: "Http://creativecommons.org/licenses/by-sa/3.0", credit: "http://commons.wikimedia.org/wiki/User:Lin%C3%A91", description: "Saffron's aroma is often described by connoisseurs as reminiscent of metallic honey with grassy or hay-like notes, while its taste has also been noted as hay-like and sweet. Saffron also contributes a luminous yellow-orange colouring to foods. Saffron is widely used in Indian, Persian, European, Arab, and Turkish cuisines. Confectioneries and liquors also often include saffron." ), TGTeacher( name: "Hank", license: "Http://creativecommons.org/licenses/by-sa/3.0", credit, "http://commons.wikimedia.org/wiki/User:Raul654", the description: "Marjoram is used for seasoning soups, stews, dressings and sauce. Majorana has been scientifically proved to be beneficial in the treatment of gastric ulcer, hyperlipidemia and diabetes. Majorana hortensis herb has been used in the traditional Austrian medicine for treatment of  disorders of the gastrointestinal tract and infections." ), TGTeacher( name: "CC", license: "Http://www.gnu.org/licenses/old-licenses/fdl-1.2.html", credit: "http://commons.wikimedia.org/wiki/User:Fir0002", description: "The leaves, both fresh and dried, are used in traditional Italian cuisine. They have a bitter, astringent taste and are highly aromatic, which complements a wide variety of foods. Herbal tea can be made from the leaves. When burnt, they give off a mustard-like smell and a smell similar to burning wood, which can be used to flavor foods while barbecuing. Rosemary is high in iron, calcium and vitamin B6.") , TGTeacher( name: "Cat", license: "http://commons.wikimedia.org/wiki/File:AniseSeeds.jpg", credit: "http://commons.wikimedia.org/wiki/User:Ben_pcc", description: "Anise is sweet and very aromatic, distinguished by its characteristic flavor. The seeds, whole or ground, are used in a wide variety of regional and ethnic confectioneries, including black jelly beans, British aniseed balls, Australian humbugs, and others. The Ancient Romans often served spiced cakes with aniseseed, called mustaceoe at the end of feasts as a digestive. " ) ] } }Copy the code

lldb

Breakpoint set -- fun-regex =. -- shlib=libfoo.dylib 1, br set - r (. *) (bB) lock (. *)/Cc opy (. *) 2, rb (. *) (bB) lock (. *)/Cc opy # (. *) to conform to the specified regular expression under the symbol of breakpoint (LLDB) breakpoint set -- fun-regex regular-expression 1, rb (. *) (bB) lock (. *)/Cc opy (. *) -- shlib = libsymtem_blocks. Dylib 2, rb (. *) (bB) lock (. *)/Cc opy (. *) - s Breakpoint set --source-pattern-regexp regular-expression --fil br breakpoint set --source-pattern-regexp regular-expression Set -p (.*)[bB]lock(.*)[Cc]opy(.*) -f runtime. CPP # alias breakpoint set -p %1 -f %2 pb (.*)[bB]lock(.*)[Cc]opy(.*) runtime.cppCopy the code

Re is used in the project

// Verify phone numberCopy the code

Comment: can’t publish if the number of characters is less than 100, isn’t the code a character? 2333333333333333333333333333333333333333333333333333333333333333333333333333333333