code: def edit_rules(self, description, key, value):
          '''
          Edit all rules that match a specified description.
  
          @description - The description to match against.
          @key         - The key to change for each matching rule.
          @value       - The new key value for each matching rule.
  
          Returns the number of rules modified.
          '''
          count = 0
          description = description.lower()
  
          for i in range(0, len(self.extract_rules)):
              if self.extract_rules[i]['regex'].search(description):
                  if has_key(self.extract_rules[i], key):
                      self.extract_rules[i][key] = value
                      count += 1
  
          return counf edit_rules(self, description, key, value):
          '''
          Edit all rules that match a specified description.
  
          @description - The description to match against.
          @key         - The key to change for each matching rule.
          @value       - The new key value for each matching rule.
  
          Returns the number of rules modified.
          '''
          count = 0
          description = description.lower()
  
          for i in range(0, len(self.extract_rules)):
              if self.extract_rules[i]['regex'].search(description):
                  if has_key(self.extract_rules[i], key):
                      self.extract_rules[i][key] = value
                      count += 1
  
          return count
docs: Edit all rules that match a specified description.
  
          @description - The description to match against.
          @key         - The key to change for each matching rule.
          @value       - The new key value for each matching rule.
  
          Returns the number of rules modified.