 Product Utils class
 ###
 class ProductUtils extends Utils
+
+  REGEX_NUMBER = new RegExp /^\d+$/
+  REGEX_UNDERSCORE_NUMBER = new RegExp /^\_\d+$/
 
   diff: (old_obj, new_obj) ->
     # patch 'prices' to have an identifier in order for the diff

            index = key
            setAction = buildSetAttributeAction(value.value, variant, index, sameForAllAttributeNames)
            actions.push setAction if setAction
        else if key.match(/^\_\d$/g)
          if _.isArray value
            v = helper.getDeltaValue(value)
            unless v

  actionsMapVariantImages = (images, old_variant, new_variant) ->
    actions = []
    _.each images, (img, key) ->
      if REGEX_NUMBER.test key
        action = buildRemoveImageAction old_variant, old_variant.images[key]
        actions.push action if action
        action = buildAddExternalImageAction old_variant, new_variant.images[key]
        actions.push action if action
      if REGEX_UNDERSCORE_NUMBER.test key
        index = key.substring(1)
        action = buildRemoveImageAction old_variant, old_variant.images[index]
        actions.push action if action
