Pharmaceuticals contain biologically active components that can pollute water courses as a result of the excretions from individuals and/or uncontrolled release of residues from chemical plants, and they can pose a hazard to health. Pharmaceutical residues can persist at low concentrations in the environment, and thus may be potentially harmful to aquatic animals and to humans. Controlling and monitoring such residues are therefore a prime interest, for example, a solid-phase extraction uses solid sorbents to purify and preconcentrate the residues prior to their chemical analysis. In the present study, poly (acrylonitrile-co-divinylbenzene-80) sorbents are synthesised by varying the comonomer feed ratios under precipitation polymerisation conditions to deliver a family of porous polymer microspheres. Acrylonitrile confers polar characters onto the sorbents, and the acrylonitrile-derived nitrile groups can be chemically transformed via polymer-analogous reactions into thioamide and sulfonated residues which make the sorbents even more suitable for the capture of polar analytes, including selected pharmaceuticals. The utility of the porous thioamide-sulfonated containing sorbents is demonstrated via the dispersion-solid phase extraction of mefenamic acid from aqueous media; mefenamic acid is an anthranilic acid derivative which is a potent, non-steroidal anti-inflammatory drug which is found in environmental waters at low concentrations.