On Mon, 25 Dec 2006 06:17:00 -0800, [EMAIL PROTECTED] wrote: > Hi folks, fairly new to the list(Python is my first programming > language, so I'm fairly new to the world of programming too)but this is > a question I've been wondering about since I started learning about the > re module. Are regular expressions what makes mark up languages > interpretable by webbrowsers?
Web browsers have to render HTML, which implies they must be able to parse and interpret at least one markup language. _How_ they parse the markup is up to the browser developers. Since regular expressions are very good at certain types of text parsing, and are widely available, it is probable that regular expressions are used in some (many? all?) markup parsers, simply because it is widely available and is a good tool for some (but not all) parsing tasks. For example, Python's xmllib module uses reg exps to parse xml. Essentially, a regular expression engine is a super-charged "find" command on steroids. But that doesn't mean that reg exps are the only tool for the job. A markup parser doesn't necessarily need to use regexes. -- Steven. -- http://mail.python.org/mailman/listinfo/python-list