A PET-based fluorometric chemosensor for the determination of mercury(II) and pH, and hydrolysis reaction-based colorimetric detection of hydrogen sulfide.