How to get the class name by a substring?
<p>I have a link with classes like this:</p>

<pre><code>&lt;a class="btn red relevant participant-1 training_id-1 state-1" href="#"&gt;
</code></pre>

<p>I need to read the 'id' numbers for a later action with ajax posts.
How can I catch from class 'participant-1' the number '1'?</p>

<p>I tried with </p>

<pre><code>var classList = $(this).attr('class').split(/\s+/);
</code></pre>

<p>but my class names will have a different order from time to time. Therefore I would need to catch them by part of their names.</p>

<p>Does anyone has an idea how to do that?</p>