Regex to get first word after slash in URL
Non-regex.
var link = document.location.href.split('/');
alert(link[3]);
JavaScript with RegEx. This will match anything after the first / until we encounter another /.
window.location.pathname.replace(/^\/([^\/]*).*$/, '$1');