hachoir-regex is a Python library for regular
expression (regex or regexp) manupulation. You can
use a|b (or) and a+b (and) operators. Expressions
are optimized during the construction to merge
ranges, simplify repetitions, etc. It also
contains a class for pattern matching, allowing
you to search multiple strings and regular
expressions at the same time.