Gets all URLs that matchs a pattern using firebug console and jQuery

[javascript]
var pattern = /^\/noticia/;
jQuery(‘a’).each(function () {
var href = jQuery(this).attr(‘href’);
if (href != undefined && href.match(pattern)) {
console.log(href);
}
})
[/javascript]

Leave a Reply