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

      prices = diff.masterVariant.prices
      if prices
        _.each prices, (value, key) ->
          if key.match(/^\d$/g)
            # key is index of new price
            index = key
          else if key.match(/^\_\d$/g)
            # key is index of old price
            index = key.substring(1)


    actions = []
    if attributes
      _.each attributes, (value, key) ->
        if REGEX_NUMBER.test key
          if _.isArray value
            v = helper.getDeltaValue(value)
            id = variant.id
