var max = 0, link; $('h3').each(function() { var d = this.textContent.match(/\d+\.\d+$/)[0]; if(d > max) { max = d; link = this.parentNode.href } })