[Zope] regex question
Doug Hellmann
hellmann@GNNcast.net
Thu, 02 Dec 1999 16:42:19 +0000
Here's the pattern I use:
_find_body_re = re.compile(
'<body[^>]*>\s*(?P<body>.*?)\s*</body>',
re.IGNORECASE| re.MULTILINE | re.DOTALL)
You can then say:
matchObj = _find_body_re.search(textString)
bodyString = matchObj.group('body')
Doug
-----------------------------------------------------------------------------
Doug Hellmann Healtheon / WebMD
Software Engineer http://www.webmd.com
hellmann@gnncast.net 404.541.2021