code: def _extract_domain_id(string, regex):
          
          regex = re.compile(regex)
          match = regex.search(string)
          if not match:
              return False
          return str(match.group(1))
docs: Extracts domain ID from given string and returns the domain ID.