var elems = document.getElementsByClassName("text text1");
var elems = document.getElementsByClassName("text text1" && !"text text1 text2");
for(var i=0;i<elems.length;i++){
var string = String(elems);
substring = "text text1 text2";
if(string.indexOf(substring) !== -1)
elems.splice(i, 1);
}
<div class="text text1 text2 text3 text4" nat="1" top_left="" style="top: ; left: -; width: ; height: ;" nature="11">
<div class="text text1 text2 text3" cupi="256" tipo="uno" tipo_z="2" style="width: ; height: ; top: left: ;">
<div class="munya"></div></div></div>
<div class="text text1 text2 text3 text4" nat="1" top_left="" style="top: ; left: ; width: ; height: ;" nature="11">
<div class="text text1 text2 text3" cupi="256" tipo="nano" tipo_z="2" style="width: ; height: ; top: ; left: ;">
<div class="munya"></div></div></div>
<div class="text text1 text2 text3" nat="1" top_left="" style="top: ; left: -; width: ; height: ;" nature="11">
<div class="text text1 text2 text3 text4" cupi="256" tipo="uno" tipo_z="2" style="width: ; height: ; top: left: ;">
<div class="munya"></div></div></div>
<div class="text text1 text2 text3" nat="1" top_left="" style="top: ; left: ; width: ; height: ;" nature="11">
<div class="text text1 text2 text3 text4" cupi="256" tipo="nano" tipo_z="2" style="width: ; height: ; top: ; left: ;">
<div class="munya"></div></div></div>
var elem=$('[tipo="uno"]').not('.text4');
elem.each(function(){
console.log( $(this));
}
Array.prototype.diff = function(arr) {
return this.filter(function(i) { return arr.indexOf(i) < 0; });
};
HTMLCollection.prototype.filter = Array.prototype.filter;
HTMLCollection.prototype.indexOf = Array.prototype.indexOf;
HTMLCollection.prototype.diff = Array.prototype.diff;
var elemsAllWithExtras = document.getElementsByClassName("text text1");
var elemsToSubstract = document.getElementsByClassName("text text1 text2");
var elemsIWant = elemsAllWithExtras.diff(elemsToSubstract);