def _parse_searchdomain():
 contents = _read_file(_DEB_RESOLV_FILE)
 pattern = 'search\\s+(?P<search_domain>\\S+)'
 prog = re.compile(pattern)
 for item in contents:
  match = prog.match(item)
  if match:
   return match.group('search_domain')
 return ''

def _parse_searchdomain ( ) : contents = _read_file ( _DEB_RESOLV_FILE ) pattern = 'search\\s+(?P<search_domain>\\S+)' prog = re . compile ( pattern ) for item in contents : match = prog . match ( item ) if match : return match . group ( 'search_domain' ) return ''
parse /etc/resolv .