now that you understand the basic principles of the html parser class in python' standard librarythe plain text extraction module used by ' pymailgui (example - will also probably make significantly more sense (this was an unavoidable forward reference which we're finally able to closerather than repeating its code herei'll simply refer you back to that exampleas well as its self-test and test input filesfor another example of html parsing in python to study on your own it' essentially minor elaboration on the examples herewhich detects more types of tags in its parser callback methods because of space concernswe have to cut short our treatment of html parsing hereas usualknowing that it exists is enough to get started for more details on the apiconsult the python library manual and for additional html supportcheck the web for the status of third-party html parser packages like those mentioned in advanced language tools if you have background in parsing theoryyou may know that neither regular expressions nor string splitting is powerful enough to handle more complex language grammars roughlyregular expressions don' have the stack "memoryrequired by true language grammarsand so cannot support arbitrary nesting of language constructs--nested if statements in programming languagefor instance in factthis is why the xml and html parsers of the prior section are required at allboth are languages of potentially arbitrary nestingwhich are beyond the scope of regular expressions in general from theoretical perspectiveregular expressions are really intended to handle just the first stage of parsing--separating text into componentsotherwise known as lexical analysis though patterns can often be used to extract data from texttrue language parsing requires more there are number of ways to fill this gap with pythonpython as language tool in most applicationsthe python language itself can replace custom languages and parsers--user-entered code can be passed to python for evaluation with tools such as eval and exec by augmenting the system with custom modulesuser code in this scenario has access to both the full python language and any applicationspecific extensions required in sensesuch systems embed python in python since this is common python rolewe'll revisit this approach later in this custom language parsersmanual or toolkit for some sophisticated language analysis tasksthougha full-blown parser may still be required such parsers can always be written by handbut since python is built for integrating toolswe can write integrations to traditional parser generator systems such as yacc and bisontools that create parsers from language text and language