The package mhchem
loads the package l3regex
, internally. This package, when loaded, says that it is better to use the l3expl
package instead.
A bit of history.
Many years ago, some brave souls started to code LaTeX3, "a long-term research project to develop the next version of the LaTeX typesetting system". The core of their work was the package expl3
. "Expl" stands for "experimental". The experiment profed so successful that they did not dare to change the package name, later on. Around the expl3
core, a lot of other experiments were started, among others the l3regex
package (standing for "LaTeX3 regular expressions"). mhchem
makes use of that package. At some point in time, the LaTeX3 developers decided that they have too many packages and that it would make sense to consolidate them all into expl3
, so that a user does not need to load so many packages (possibly in a very specific order). So, they moved all the functionality into expl3
and, at the same time, added a warning into l3regex
so that users would know (but the package is still functional). Following that, the mhchem
package was fairly quickly updated to use expl3
only instead of l3regex
. Unfortunately, a widely-used distribution of package (TeXLive 2017?) included l3regex
with the warning and mhchem
in the old version still using l3regex
. Since years, this has been given users a warning when using mhchem
that they oftentimes do not understand. I really hope this distribution will fall out-of-use, eventually.
expl3
), modules were split across many packages, e.g. regex functions reside in thel3regex
package. Because of a lot of depencencies between those packages it became tedious to figure out the correct loading order, so all these modules were put into one huge packageexpl3
which loads all of them at once. So the message tells you to just use\usepackage{expl3}
instead of loading each of thoseexpl3
packages separately.\usepackage{expl3}
didn't make the warning message go away either.mhchem
andexpl3
give rise to the warning message you saw. These packages have been updated in TeX Live 2018 so they are now compatible with each other—hence no warnings.