Hi,
I have to parse an array of urls and get
only the url with a target domain.
I ended up with:
Code JavaScript:
var regEx = /www.emp-online.it/;
var urls = [
    'http://www.emp-online.it/bin/shop.php?prog=shop&funktion=PRODUCTINFO&article=670017',
    'http://www.masteringapi.com/tutorials/how-to-check',
    'http://facebook.stackoverflow.com/questions/3548493/how-to-',
    'http://www.emp-online.it/art_670017/'
];
for(var i = 0,len = urls.length; i < len; i++){
    if(regEx.test(urls[i])){
        console.log(urls[i]);
    }
}

Is it the right way ?
Is there a better way ?

When I have to deal with regex
I'm always doubtful