Find and get last character of class name
<p>I have html with class that always differs depending on amount of elements inside it(ul>li...)
class name has pattern like <code>sf-single-children-*</code> where <code>*</code> always different depending on li's inside it. How do i get this <code>*</code> with javascript, so i could style depending on this number?</p>

<p>Example code:</p>

<pre><code>&lt;ul class='someclass'&gt;
    &lt;li class="sf-single-children-* some-other-classes-here-aswell"&gt;
        &lt;ul style="width: * "&gt;
            &lt;li&gt;Item with no children element&lt;/li&gt;
            &lt;li&gt;Item with no children element&lt;/li&gt;
            &lt;li&gt;Item with no children element&lt;/li&gt;
            &lt;li&gt;Item with no children element&lt;/li&gt;
            &lt;li&gt;Item with no children element&lt;/li&gt;
            &lt;li&gt;Item with childer element which should not be counted
              &lt;ul&gt;
                 &lt;li&gt;Item with no children element&lt;/li&gt;
                 &lt;li&gt;Item with no children element&lt;/li&gt;
                 &lt;li&gt;Item with no children element&lt;/li&gt;
              &lt;/ul&gt;
            &lt;/li&gt;
        &lt;/ul&gt;
    &lt;/li&gt;
&lt;/ul&gt;
</code></pre>

<p>The other way how i'd do this its count elements in only parent <code>&lt;ul&gt;</code> But i'm not sure how to do that</p>
