Regular Expression

wiki page

Regular expression is a sequence of character(s) mainly used to find and replace patterns in a string or file.
So we can say that the task of searching and extracting is so common that Python has a very powerful library called regular expressions that handles many of these tasks quite elegantly.

SYMBOLUSAGE
$Matches the end of the line
\sMatches whitespace
\SMatches any non-whitespace character
*Repeats a character zero or more times
\SMatches any non-whitespace character
*?Repeats a character zero or more times (non-greedy)
+Repeats a character one or more times
+?Repeats a character one or more times (non-greedy)
[aeiou]Matches a single character in the listed set
[^XYZ]Matches a single character not in the listed set
[a-z0-9]The set of characters can include a range
(Indicates where string extraction is to start
)Indicates where string extraction is to end

website to check regular expression