code: def href_name (txt):
      
      name = u""
      endtag = a_end_search(txt)
      if not endtag:
          return name
      name = txt[:endtag.start()]
      if img_re.search(name):
          return image_name(name)
      return _unquote(name)
docs: Return the name part of the first <a href="">name</a> link in txt.