I have a python template engine that heavily uses regexp. It uses concatenation like:
re.compile( regexp1 + \"|\" + regexp2 + \"*|\" + regexp3 + \"+\" ) <
re.compile( regexp1 + \"|\" + regexp2 + \"*|\" + regexp3 + \"+\" )
Or, use some list comprehension to remove the useless regexp entries and join to put them all together. Something like:
re.compile('|'.join([x for x in [regexp1, regexp2, ...] if x != None]))
Be sure to add some comments next to that line of code though :-)