title: jquery regex issue match any string a-zA-Z0-1
body: <p>For some reaon, I cannot use nested div, and I m trying to toggle a tree of divs
  Div id contains any string except -</p>
  
  <pre><code>&lt;div class="tree"&gt;
      &lt;div id="a"&gt;id=a click to toggle child&lt;/div&gt; 
          &lt;div id="a-1"&gt; == id=a-1&lt;/div&gt;
              &lt;div id="a-1-f"&gt; == == id=a-1-f&lt;/div&gt;
              &lt;div id="a-1-g"&gt; == == id=a-1-g&lt;/div&gt;
          &lt;div id="a-2"&gt; == id=a-2&lt;/div&gt;
      &lt;div id="b"&gt;id=b&lt;/div&gt;
  &lt;/div&gt;
  
  $('.tree').children().on('click',function(){
      var $id = $(this).attr('id');
      $(this).parent().children().removeClass('on');
      $(this).toggleClass('on');
      $('[id^='+$id+'-]').hide();
      var str = /^[a-zA-Z0-9]*$/;
      if ($(this).hasClass('on')) {
          $('[id^='+$id+'-'+ str +']').show();
      }
  });
  </code></pre>
  
  <p>what should i do for the str above in js</p>
  
  <p><a href="http://jsfiddle.net/cn856y49/4/" rel="nofollow">http://jsfiddle.net/cn856y49/4/</a></p>
  
  <p>What I'm trying to do is: click on any div above: hide all its children and grandchildren, or show only its children.</p>
  
  <p>Hide is working now. However I'm not sure how to make show working.</p>
  
  <p>E.g.. click on id=a will hide all id=a-1, a-xx-xx etc, click on id=a again will only show its next level kids</p>