title: How to identify that a URL path string contains path params in javascript?
body: <p>So what I am trying to do is to identify if a URL path string contains any path params or not. For example:</p>
  <ol>
  <li>/product/1/detail  ==&gt; this should be identified as true</li>
  <li>/user/sam/detail ===&gt; this should be identified as true</li>
  <li>/product ===&gt; this should be identified as false</li>
  </ol>
  <p>Further, I will also have a dictionary that is list of similar URl paths ie [ '/company/5/info', '/user/ram/detail']</p>
  <p>[
  '/product/5/detail',
  '/user/ram/detail'
  ]</p>
  <p>I do not know if this will be helpful for checking patterns or any formation.</p>
  <p>Constraints:
  The URL that is to be checked can be any URL. That is we will not have any such known patterns besides a list of URL's like [ '/product/5/detail', '/user/ram/detail']</p>