special codecs module handles unicode and represents content with the unicode type we'll meet unicode again in the files coverage later in this but save the rest of the unicode story for later in this book it crops up briefly in example in conjunction with currency symbolsbut for the most part is postponed until this book' advanced topics part unicode is crucial in some domainsbut many programmers can get by with just passing acquaintance if your data is all ascii textthe string and file stories are largely the same in and and if you're new to programmingyou can safely defer most unicode details until you've mastered string basics pattern matching one point worth noting before we move on is that none of the string object' own methods support pattern-based text processing text pattern matching is an advanced tool outside this book' scopebut readers with backgrounds in other scripting languages may be interested to know that to do pattern matching in pythonwe import module called re this module has analogous calls for searchingsplittingand replacementbut because we can use patterns to specify substringswe can be much more generalimport re match re match('hello\ ]**)world''hello match group( 'python python world'this example searches for substring that begins with the word "hello,followed by zero or more tabs or spacesfollowed by arbitrary characters to be saved as matched groupterminated by the word "world if such substring is foundportions of the substring matched by parts of the pattern enclosed in parentheses are available as groups the following patternfor examplepicks out three groups separated by slashesand is similar to splitting by an alternatives patternmatch re match('[/:]*)[/:]*)[/:]*)''/usr/home:lumberjack'match groups(('usr''home''lumberjack're split('[/:]''/usr/home/lumberjack'['''usr''home''lumberjack'pattern matching is an advanced text-processing tool by itselfbut there is also support in python for even more advanced text and language processingincluding xml and html parsing and natural language analysis we'll see additional brief examples of patterns and xml parsing at the end of but 've already said enough about strings for this tutorialso let' move on to the next type introducing python object types