Use a ',' to achieve OR
links = $('a[href*="abcd"],[href*="xyz"]');
links = $('a[href*="abcd"],[href*="xyz"]');
links.each(function(){
console.log($(this).text());
})
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<a href="blahabcd.org">Link abcd</a>
<a href="blahxyz.org">Link xyz</a>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…