Novel molecularly imprinted polymer using 1-(α-methyl acrylate)-3-methylimidazolium bromide as functional monomer for simultaneous extraction and determination of water-soluble acid dyes in wastewater and soft drink by solid phase extraction and high performance liquid chromatography.