docs: def pposition(hd, details=False):
      """Parse string into angular position.
  
      A string containing 2 or 6 numbers is parsed, and the numbers are
      converted into decimal numbers. In the former case the numbers are
      assumed to be floats. In the latter case, the numbers are assumed
      to be sexagesimal.
  
      Parameters
      ----------
      hd: str
        String containing 2 or 6 numbers. The numbers can be spearated
        with character or characters other than ".", "-", "+".
  
        The string must contain either 2 or 6 numbers.
  
      details: bool
        The detailed result from parsing the string is returned. See
        "Returns" section below.
  
        Default is False.
  
      Returns
      -------
      x: (float, float) or dict
        A tuple containing decimal equivalents of the parsed numbers. If
        the string contains 6 numbers then they are assumed be
        sexagesimal components.
  
        If ``details`` is True then a dictionary with the following keys
        is returned:
  
          x: float
            The first number.
          y: float
            The second number
          numvals: int
            Number of items parsed; 2 or 6.
          raw_x: dict
            The result returned by ``phmsdms`` for the first number.
          raw_y: dict
            The result returned by ``phmsdms`` for the second number.
  
        It is up to the user to interpret the units of the numbers
        returned.
  
      Raises
      ------
      ValueError:
        The exception is raised if the string cannot be interpreted as a
        sequence of 2 or 6 numbers.
  
      Examples
      --------
      The position of M100 reported by SIMBAD is
      "12 22 54.899 +15 49 20.57". This can be easily parsed in the
      following manner.
  
      >>> from angles import pposition
      >>> ra, de = pposition("12 22 54.899 +15 49 20.57")
      >>> ra
      12.38191638888889
      >>> de
      15.822380555555556
  
      """
      # :TODO: split two angles based on user entered separator and process each part separately.
      # Split at any character other than a digit, ".", "-", and "+".
      p = re.split(r"[^\d\-+.]*", hd)
      if len(p) not in [2, 6]:
          raise ValueError("Input must contain either 2 or 6 numbers.")
  
      # Two floating point numbers if string has 2 numbers.
      if len(p) == 2:
          x, y = float(p[0]), float(p[1])
          if details:
              numvals = 2
              raw_x = p[0]
              raw_y = p[1]
      # Two sexagesimal numbers if string has 6 numbers.
      elif len(p) == 6:
          x_p = phmsdms(" ".join(p[:3]))
          x = sexa2deci(x_p['sign'], *x_p['vals'])
          y_p = phmsdms(" ".join(p[3:]))
          y = sexa2deci(y_p['sign'], *y_p['vals'])
          if details:
              raw_x = x_p
              raw_y = y_p
              numvals = 6
  
      if details:
          result = dict(x=x, y=y, numvals=numvals, raw_x=raw_x,
                        raw_y=raw_y)
      else:
          result = x, y
  
      return result