###### tags: python # Regular Expressions import re pattern = re.compile('this') string = 'search inside of this text please!' re.search('this', string) a = pattern.search(string) b = pattern.findall(string) c = pattern.fullmatch(string) - totally match the string or return none d= pattern.match(string) print(a.span()) print(a.start()) print(a.end()) print(a.group()) pattern = re.compile('') ## To verify correct email address `r"(^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$)`