This is a bit more complicated than it needs to be. You're repeating logic like `.strip()` in a bunch of places. To simplify, it could look something like this:

````python
def shouldRespond(text):
  match = re.search(r'obot ((\w* )*)bomb( (\d*))?', text)
  if match is not None:
    topic = match.group(1).strip() or DEFAULT_BOMB_TOPIC
    number = (match.group(3) or '').strip() or DEFAULT_BOMB_COUNT
    return topic, number
    
  return None, None 
````

The `val1 or val2` syntax is your friend. :smile: