1. A method of detecting a first signal in a received signal (y) using a pattern (ŝ), the received signal (y) comprising at least one signal group (y (1) ,. .. , y (J) ), each signal group comprising a number (K) of signal symbols, the pattern (ŝ) comprising at least one pattern group (ŝ (1) ,. .. , ŝ (J) ), each pattern group comprising at least a number (K) of pattern symbols, the method comprising: multiplying, for each of said at least one signal group (y (1) ,. .. , y (J) ), each signal symbol with a corresponding pattern symbol of a said at least one pattern group (ŝ (1) ,. .. , ŝ (J) ) and deriving a sum (Σ 1 ,. .. , Σ J ; A j ) of the products of multiplication; applying a weight factor (x 1 ,. .. , x J ; Ĉ j ) of one or more weight factors (x 1 ,. .. , x J ; Ĉ j ) to each sum (Σ 1 ,. .. , Σ J ; A j ) giving a weighted sum (x 1 Σ 1 ,. .. , x J Σ J ; A j /Ĉ j ), wherein said one or more weight factors (x 1 ,. .. , x J ; Ĉ j ) are selected to preserve an orthogonality relation of said pattern symbols of the at least one pattern group; and determining if a signal is detected or not based on said one or more weighted sums (x 1 Σ 1 ,. .. , x J Σ J ; A j /Ĉ j ).