docs: def is_solid(regex):
      """
      Check the given regular expression is solid.
  
      >>> is_solid(r'a')
      True
      >>> is_solid(r'[ab]')
      True
      >>> is_solid(r'(a|b|c)')
      True
      >>> is_solid(r'(a|b|c)?')
      True
      >>> is_solid(r'(a|b)(c)')
      False
      >>> is_solid(r'(a|b)(c)?')
      False
      """
  
      shape = re.sub(r'(\\.|[^\[\]\(\)\|\?\+\*])', '#', regex)
      skeleton = shape.replace('#', '')
      if len(shape) <= 1:
          return True
      if re.match(r'^\[[^\]]*\][\*\+\?]?$', shape):
          return True
      if re.match(r'^\([^\(]*\)[\*\+\?]?$', shape):
          return True
      if re.match(r'^\(\)#*?\)\)', skeleton):
          return True
      else:
          return False