Abstract : We propose a new method for the detection of spectral lines in random noise. It mimics the processing scheme of matching filtering, i.e., a whitening procedure combined with the measurement of the correlation between the data and a template. Thanks to the original noise spectrum estimate used in the whitening procedure, the algorithm can easily be tuned to various types of noise. It can thus be applied to the data taken from a wide class of sensors. This versatility and its small computational cost make this method particularly well suited for real-time monitoring in gravitational wave experiments. We show the results of its application to Virgo C4 commissioning data.