1.with a single character.: Represents characters other than line breaks : Represents the range -: Represents the interval [1234567890]: indicates any character in the match [a-z]: indicates the matching of any letter between lowercase letters a-z [a-z]: indicates the matching of any letter between the size characters a to z [0-9a-za-z]: indicates the matching of any number and letter [ 0-9]: indicates the matching of any non-numeric character d: indicates the matching of any number of the number, equivalent to [ 0-9] d: means to negate d, which means to match any non-numeric character, equivalent to [ 0-9] w: means to match any number, letter, underscore, equivalent to [0-9a-za-z] w: means to negate w, match any character except numbers, letters, and underscores s: means to match any whitespace (space, line break, carriage return, page change, tab) s: means to negate s
2.instance
import reprint(re.)search(".", "hello987")) # print(re.search(".", "helloworld")) # print(re.search("he[asdf]llo", "heallo")) # print(re.search("he[asdf]llo", "hemllo")) # noneprint(re.search("he[0-9]llo", "he643llo")) # noneprint(re.search("he[0-9]llo", "he3llo")) # print(re.search("he\\dllo", "he8llo")) # print(re.search("he\\dllo", "he8llo")) # noneprint(re.search("he\\dllo", "heallo")) # print(re.search("he[a-z]llo", "hewllo")) # print(re.search("he[a-z]llo", "hebllo")) # print(re.search("he\\wllo", "he4llo")) # print(re.search("he\\wllo", "hecllo")) # print(re.search("he\\wllo", "heello")) # print(re.search("he\\wllo", "he_llo")) # print(re.search("he\\wllo", "he%llo")) # noneprint(re.search("he\\wllo", "he%llo")) # print(re.search("he\\wllo", "he8llo")) # noneprint(re.search("he\\wllo", "hesllo")) # noneprint(re.search("he\\wllo", "hepllo")) # noneprint(re.search("he\\wllo", "he_llo")) # none**10,000 Fans Incentive Plan