Extract sub codes