jquery, extract number value from name tag
<p>I have this being created by my perl script.</p>

<pre><code>    print qq|
        \$('textarea[name=category$row[0]]').keydown(function(event)
         {
            \$("input[value=$row[0]]").attr('checked', true);
        });
    |;
</code></pre>

<p>Somewhere later, I have this, I want to reextract the $row[0] value but I am not sure how in jquery.</p>

<pre><code>print qq|
&lt;script&gt;
    \$('#display_category').change(function() {
        var text = \$(this).val();

        \$('textarea[name^="category"]').each(function() {
            var foundvalue = \$(this).val();

            if (text == foundvalue)
            {
                alert("FOUND HERE " + foundvalue);

            }
        });
    });
&lt;/script&gt;

|;
</code></pre>

<p>how do i reextract the \d+ from category and use it in my if condition?</p>
