I am not sure what version of Mathematica are you using. I am using latest 10.1 version. It returns ChemicalData
as list of so called Entity
(orange things below).
chedat = ChemicalData[];
chedat[[;; 5]]
This is why below I use CommonName
. Besides that, using pattern ___
or BlankNullSequence
instead of __
or BlankSequence
will also give you the "border" cases when hydrogen has no characters on the right or / and left.
Flatten[StringCases[CommonName[chedat], __ ~~ "hydro" ~~ __ ]] // Length
4274
Flatten[StringCases[CommonName[chedat], ___ ~~ "hydro" ~~ ___ ]] // Length
4374