regular expressions escape character since we use special characters in regular expressions to match the beginning or end of line or specify wild cardswe need way to indicate that these characters are "normaland we want to match the actual character such as dollar sign or caret we can indicate that we want to simply match character by prefixing that character with backslash for examplewe can find money amounts with the following regular expression import re 'we just received $ for cookies re findall('\$[ - ]+',xsince we prefix the dollar sign with backslashit actually matches the dollar sign in the input string instead of matching the "end of line"and the rest of the regular expression matches one or more digits or the period character noteinside square bracketscharacters are not "specialso when we say [ - ]it really means digits or period outside of square bracketsa period is the "wildcardcharacter and matches any character inside square bracketsthe period is period summary while this only scratched the surface of regular expressionswe have learned bit about the language of regular expressions they are search strings with special characters in them that communicate your wishes to the regular expression system as to what defines "matchingand what is extracted from the matched strings here are some of those special characters and character sequencesmatches the beginning of the line matches the end of the line matches any character ( wildcard\ matches whitespace character \ matches non-whitespace character (opposite of \sapplies to the immediately preceding character(sand indicates to match zero or more times *applies to the immediately preceding character(sand indicates to match zero or more times in "non-greedy modeapplies to the immediately preceding character(sand indicates to match one or more times +applies to the immediately preceding character(sand indicates to match one or more times in "non-greedy mode