Three electronic transitions of the isoelectronic species HC2nH- and HC2n-1N- and one of the neutral polyacetylenes HC2nH (n = 6-12) have been observed by absorption spectroscopy in neon matrixes. Anions produced in an electron impact source were mass-selected and codeposited with excess of neon at 6 K. The HC2nH species were formed from the anions by photodetachment. A well-structured band system at 780 nm for HC12H-, and shifting by regular increments to 1325 nm for HC24H-, is assigned to two overlapping electronic transitions of (2)Pi <-- X(2)Pi symmetry. Another (2)Pi <-- X(2)Pi transition with broader features is observed in the 300-480 nm region. Corresponding transitions are observed for the isoelectronic cyanosubstituted anions HC2n-1N-. The neutral polyacetylenes show a vibrationally well-resolved UV band system attributed to the (1)Sigma(u)(+) <-- X(1)Sigma(g)(+) electronic transition. The energy of the electronic transition shows a characteristic inverse dependence on the carbon chain length.