title: How to get username from an url after matching url with a particular string?
body: <p>I want to get username from an url after checking the rest of url is similar to a string.</p>
  
  <p>For eg : I need username from the url 'http://mysite.com/username' . before that need to check </p>
  
  <p>site url as 'http://mysite.com/' and also username part contains only alphabets,numbers, </p>
  
  <p>underscore and periods..</p>
  
  <p>How is it possible using php?</p>