)'''re verboseextension note how the previous example uses the triple-quote syntax ('''to create multiline string so that you can spread the regular expression definition over many linesmaking it much more legible the comment rules inside the regular expression string are the same as regular python codethe symbol and everything after it to the end of the line are ignored alsothe extra spaces inside the multiline string for the regular expression are not considered part of the text pattern to be matched this lets you organize the regular expression so it' easier to read combining re ignorecasere dotalland re verbose what if you want to use re verbose to write comments in your regular expression but also want to use re ignorecase to ignore capitalizationunfortunatelythe re compile(function takes only single value as its second argument you can get around this limitation by combining the re ignorecasere dotalland re verbose variables using the pipe character (|)which in this context is known as the bitwise or operator so if you want regular expression that' case-insensitive and includes newlines to match the dot characteryou would form your re compile(call like thissomeregexvalue re compile('foo're ignorecase re dotallincluding all three options in the second argument will look like thissomeregexvalue re compile('foo're ignorecase re dotall re verbosethis syntax is little old-fashioned and originates from early versions of python the details of the bitwise operators are beyond the scope of this bookbut check out the resources at more information you can also pass other options for the second argumentthey're uncommonbut you can read more about them in the resourcestoo projectphone number and email address extractor say you have the boring task of finding every phone number and email address in long web page or document if you manually scroll through the pageyou might end up searching for long time but if you had program that could search the text in your clipboard for phone numbers and email addressesyou could simply press ctrl- to select all the textpress ctrl - to copy it to the clipboardand then run your program it could replace the text on the clipboard with just the phone numbers and email addresses it finds pattern matching with regular expressions