I'm getting a string from an asps page like this:

```
~/TestImages/media/9.jpg?width=443&height=388&ext=.jpg?id=92, 
~/TestImages/media/8.jpg?width=506&height=337&ext=.jpg?id=91, 
~/TestImages/media/jpeg-3.jpg?width=720&height=480&ext=.jpg?id=75, 
~/TestImages/media/4.jpg?width=725&height=483&ext=.jpg?id=77, 
~/TestImages/media/7.jpg?width=957&height=629&ext=.jpg?id=81, 
~/TestImages/media/10.jpg?width=478&height=356&ext=.jpg?id=85,

```

Each has a line break "\r\n" though..

Want to create an array with just the URL's (ie. "/TestImages/media/9.jpg").

Trying:

```
$.ajax({
        url: url,
        success: function(data){
            var str = data.replace(/(\r\n|\n|\r)/gm,""),
                imgArray = new Array,
                tdata = str.split(",");

            // make random order
            for(var i=0; i < 13; i++){
                var randomNumber = Math.floor(Math.random()*tdata.length);
                imgArray.push(tdata.splice(randomNumber,1));
            }
            $.each(imgArray, function(i, item) {
                var tmp = "";
                tmp = item[0].match(/~(.*?)\.jpg/g, "$1");                 
                item[0] = tmp;
            });

        }
    });

```

Not having much luck changing the value inside the array.. anyone have a way to do this?