jQuery / JS - Detecting / Matching an URL string to determine it's type
<p>I have two URLs types, (TYPE A)</p>

<pre><code>/items
</code></pre>

<p>Or /items/XXXX with a trailing number (TYPE B)</p>

<pre><code>/items/187
/items/12831
</code></pre>

<p>I would like to know how to detect if the URL is type A or Type B</p>

<pre><code>if (TYPE A) ... else if (TYPE B) ....
</code></pre>

<p>Any suggestions for making this happen? Do I need a regex?</p>

<p>thanks</p>
