match rpm pattern with regexp