title: Count number of Slashes in the URL Using Regex
body: <p>I need to get number of slashes from the given url using regex alone.</p>
  
  <pre><code>For example URL looks like below:
  /abc/123/ab1/bc2/efg
  
  Required Result Should be : 5 (Number of slashes)
  </code></pre>
  
  <p>Here i am not going to handle the count by incrementing matches one by one by using anyother language.
  Just i need to use regular expression to fetch the number of slashes.
  Is it possible to fetch the count by using regex alone ?</p>
  
  <p>Thanks in Advance!</p>