import re


def search_within_string(input_string, pattern):
  """Search for regular expression in a string.

  input_string: (string) to be searched
  pattern: (string) to be passed to re.compile, with a symbolic
           group named 'return'.
  default: what to return if no match

  Returns a string or None
  """
  match = re.search(pattern, input_string)
  return match.group('return') if match else None