Extract rules.