msg = msg.replace(/http:\/\/something\.com\/search\/byprice\/page\.php\?id=[a-f\-0-9]+(?:&page=\d+)?/gi, '<a href="$&">$&</a>');