A simple approach to prepare molecularly imprinted polymers from nylon-6.