Shared Flashcard Set

Details

Using Regular Expressions
Obtaining pattern information in strings
8
Other
Post-Graduate
09/08/2019

Additional Other Flashcards

 


 

Cards

Term
Function for searching a pattern in ANYWHERE in a string
Definition
re.search(pattern, string)
Term
Function for searching a pattern in an EXACT string
Definition
re.match(pattern, string)
Term
Function for retrieving the exact pattern in the string
Definition
m = re.search(pattern, string)
m.group()
Term
Function for retrieving the start position of the regular expression in a string
Definition
m = re.search(pattern, string)
m.start()
Term
Function for retrieving the end position of the regular expression in a string
Definition
m = re.search(pattern, string)
m.end()
Term
Function for searching multiple expression matches in a string
Definition
re.finditer(pattern, string)
Term
Function for retrieving multiple expression matches in a string
Definition
re.findall(pattern, string)
Term
Functions for splitting a string into segments, excluding a pattern
Definition
re.split(pattern,string)
Supporting users have an ad free experience!