The pre Module

(Implementation) The pre module, used in Example 13-8, is a low-level implementation module for the 1.5.2 re module. There’s usually no need to use this module directly (and code using it may stop working in future releases).

Example 13-8. Using the pre Module

File: pre-example-1.py

import pre

p = pre.compile("[Python]+")

print p.findall("Python is not that bad")

['Python', 'not', 'th', 't']

Get Python Standard Library now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.