I am trying to find a span element who has an id in a particular pattern. Its main use is to find certain elements rendered by an asp.net (aspx) page which is derived from a master page.
$('span').each(function(){
if( $(this).attr('id').match(/pattern/) ) {
// your code goes here
}
});
problem solved.