var url = window.location.search, index = url.lastIndexOf('=') + 1, sub = url.substring(index), text = decodeURI(sub); results = result.replace(new RegExp(text,"g"), "<b style='color:#f00'>"+text+"</b>");