(1) If you want to use one regular expression you could use:
known_activities = ['Out: Packet Sizes']
# you might have to use '\s' or '\ ' to protect the whitespaces.
activity_exprs = [a.replace(' ', '\s') for a in known_activities]
regexpr = r'('+'|'.join(activity_exprs)+r')\s*Histogram\sBucket\s(\d+=\d+)'
pattern = re.compile(regexpr)
match = pattern.match(input)
if match:
print('Activity: '+match.group(1))
print('Bucket: '+match.group(2))
(2) If you don't want (or have to) match the activities, it you could also go simply with:
regexpr = r'(.*?)\s*Histogram\sBucket\s(\d+=\d+)'
pattern = re.compile(regexpr)
match = pattern.match(input)
if match:
print('Activity: '+match.group(1))
print('Bucket: '+match.group(2))
(3) If you do want to match activities you can always do so in a separate step:
if match:
activity = match.group(1)
if activity in known_activities:
print('Activity: '+activity )
print('Bucket: '+match.group(2))
EDIT Some more details and explanations:
items = ['a','b','c']
'|'.join(items)
produces a|b|c. Used in regular expressions | denotes alternatives, e.g. r'a(b|c)a' will match either 'aba' or 'aca'. So in (1) I basically chained all known activities as alternatives together. Each activity has to be a valid regular expression in it self (that is why any 'special' characters (e.g. whitespace) should be properly escaped).
One could simply mash together all alternatives by hand into one large regular expression, but that gets unwieldy and error prone fast, if there are more than a couple of activities.
All in all you are probably better of using (2) and if necessary (3) or a separate regular expression as a secondary stage.
EDIT2
regarding your sample line you could also use:
regexpr = r'([^\s]*?)\s([^\s]*?)\s([^\s]*?)\s(.*?)\s*Histogram\sBucket\s(\d+=\d+)'
pattern = re.compile(regexpr)
match = pattern.match(input)
if match:
print('Date: '+match.group(1))
print('Time: '+match.group(2))
print('Activity: '+match.group(3))
print('Sub: '+match.group(4))
print('Bucket: '+match.group(5))
EDIT3
pattern.match(input) expects to find the pattern directly at the beginning of the input string. That means 'a' will match 'a' or 'abc' but not 'ba'. If your pattern does not start at the beginning you have to prepend '.*?' to your regular expression to consume as much arbitrary characters as necessary.
'\s' matches any whitespace character, '[^\s]' matches any character that is NOT whitespace.
If you want to learn more about regular expressions, the python HOWTO on that matter is quite good.