Answers for "regex to get first word after slash in URL"

0

regex to get first word after slash in URL

window.location.pathname.replace(/^\/([^\/]*).*$/, '$1');
Posted by: Guest on July-19-2021

Code answers related to "regex to get first word after slash in URL"

Browse Popular Code Answers by Language