def with_replaced_national_prefix(phone, data)
      return phone unless data[Core::NATIONAL_PREFIX_TRANSFORM_RULE]
      pattern = cr("^(?:#{data[Core::NATIONAL_PREFIX_FOR_PARSING]})")
      match = phone.match pattern
      if match && match.captures.compact.size > 0
        phone.gsub(pattern, data[Core::NATIONAL_PREFIX_TRANSFORM_RULE])
      else
        phone
      end
    end
def with_replaced_national_prefix(phone, data)
      return phone unless data[Core::NATIONAL_PREFIX_TRANSFORM_RULE]
      pattern = cr("^(?:#{data[Core::NATIONAL_PREFIX_FOR_PARSING]})")
      match = phone.match pattern
      if match && match.captures.compact.size > 0
        phone.gsub(pattern, data[Core::NATIONAL_PREFIX_TRANSFORM_RULE])
      else
        phone
      end
    end
replacing national prefix to simplified format