Recognition of matrices which are sign-regular of a given order and a generalization of oscillatory matrices