I'm using jquery, as well as the CSVtoTable (plugin here: <https://code.google.com/p/jquerycsvtotable/> ) plugin to convert large CSV files into tables that I can manipulate. I need to attach links relevant to each row.

I need to convert the text in one of these rows to add a link to a pdf. The problem is I can't seem to modify the strings. I'm using data like that found here: <http://jsfiddle.net/bstrunk/vaCuY/297/>

The file names generated by my system can't be easily edited, so I'm stuck using these formats:

* 423-1.pdf

So I need to convert two strings from tables formatted like so:

* 4/23/2013
* 1

to drop the year, as well as the slashes, and add a '-' and then the extra digit. 
I'm able to grab the table data, I just can't seem to manipulate the variables with either the .replace or .substr 

```
$(document).ready(function () {
    $("tr td:nth-child(5)").each(function () {
        var $docket = $('td=eq(5)');
        var $td = $(this);
        var $dataDate = $td.substr(0, $td.lastIndexOf("/"));
        var $newDataDate = $dataDate.replace("/", "");
        $td.html('<a html="./docs/' + $newDataDate.text() + '-' + $docket.text() + '.pdf">' + $td.text() + '</a>');
    });
});

```

(edit): Sample table data:

```
<tr><td>13CI401111</td><td>22</td><td>Name1</td><td>Name2</td><td>4/23/2013</td><td>1</td></tr>
<tr><td>13CI401112</td><td>22</td><td>Name1</td><td>Name2</td><td>4/24/2013</td><td>2</td></tr>

```