Decoder made with regex